/* Modern Clean White and Blue/Purple Style */
:root {
    --primary-color: #6366f1; /* Indigo/Purple */
    --primary-dark: #4f46e5;
    --secondary-color: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-main: #ffffff;
    --bg-alt: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-alt);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

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

/* Navbar */
.navbar {
    background: var(--bg-main);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 1.25rem; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary-color); }
select { padding: 0.25rem; border: 1px solid var(--border-color); border-radius: 4px; }

/* Dropdown Menu */
.dropdown { position: relative; display: inline-block; }
.dropbtn { background: none; border: none; color: var(--text-muted); font-weight: 500; font-size: 1rem; cursor: pointer; padding: 0; font-family: inherit; }
.dropbtn:hover { color: var(--primary-color); }
.dropdown-content { 
    display: none; position: absolute; background-color: var(--bg-main); 
    min-width: 160px; box-shadow: var(--shadow-md); z-index: 101; 
    border-radius: 0.5rem; overflow: hidden; border: 1px solid var(--border-color);
    top: 100%; left: 0;
}
.dropdown-content a { color: var(--text-main); padding: 10px 16px; text-decoration: none; display: block; font-weight: 400; }
.dropdown-content a:hover { background-color: var(--bg-alt); color: var(--primary-color); }
.dropdown:hover .dropdown-content { display: block; }

.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }


/* Main */
main { flex: 1; padding: 2rem 0; }

/* Hero */
.hero { padding: 4rem 0; background: var(--bg-main); margin-bottom: 3rem; }
.hero h1 { font-size: 3rem; color: var(--text-main); margin-bottom: 1rem; }
.hero .subtitle { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.privacy-badge { display: inline-block; background: #dcfce7; color: #166534; padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.875rem; font-weight: 600; }

/* Tools Grid */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.tool-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
}
.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}
.tool-card .icon { font-size: 3rem; margin-bottom: 1rem; color: var(--primary-color); }
.tool-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.tool-card p { font-size: 0.875rem; color: var(--text-muted); }

/* Tool Page Specific */
.tool-header { text-align: center; margin-bottom: 2rem; }
.upload-area {
    background: var(--bg-main);
    border: 2px dashed var(--primary-color);
    border-radius: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}
.upload-area:hover { background: var(--bg-alt); }
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn:hover { background: var(--primary-dark); }

/* FAQ */
.faq { margin-top: 4rem; margin-bottom: 4rem; }
.faq h2 { text-align: center; margin-bottom: 2rem; }
.faq-item { background: var(--bg-main); margin-bottom: 1rem; padding: 1.5rem; border-radius: 0.5rem; box-shadow: var(--shadow-sm); }
.faq-item h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }

/* Footer */
.footer { background: var(--bg-main); border-top: 1px solid var(--border-color); padding: 2rem 0; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; }
.footer-links a:hover { color: var(--primary-color); }
.privacy-msg { font-size: 0.875rem; color: #166534; font-weight: 500; margin-bottom: 0.5rem; }

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .navbar .container { flex-wrap: wrap; }
    .mobile-menu-btn { display: block; }
    .nav-links { 
        display: none; flex-direction: column; width: 100%; 
        background: var(--bg-main); padding: 1rem 0; 
        gap: 1rem; align-items: stretch; margin-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    .nav-links.active { display: flex; }
    .dropdown-content { position: static; box-shadow: none; border: none; display: none; padding-left: 1rem; margin-top: 0.5rem; }
    .dropdown:hover .dropdown-content, .dropdown:focus-within .dropdown-content { display: block; border-left: 2px solid var(--border-color); }
}


/* RTL Support */
html[dir='rtl'] { text-align: right; }
html[dir='rtl'] .nav-links { margin-left: 0; margin-right: auto; }
html[dir='rtl'] .faq-item h3::after { left: 0; right: auto; }
