/*
Theme Name: Tools Hub - Complete Final
Version: 12.0.0
*/

:root {
    --header-blue: #0056B3;
    --btn-blue: #1976D2;
    --card-border: #D0E7FF;
    --footer-bg: #222;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #666666;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Tahoma, Geneva, sans-serif; color: var(--text-dark); background-color: var(--light-bg); line-height: 1.6; }
body.rtl { direction: rtl; text-align: right; }
h1, h2, h3 { font-weight: 700; color: var(--text-dark); }
h2 { font-size: 1.8rem; text-align: center; margin-bottom: 2.5rem; }
a { color: var(--btn-blue); text-decoration: none; transition: all 0.3s ease; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
header {
    background-color: var(--header-blue);
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

/* CARD */
.card {
    background: var(--white);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 280px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,86,179,0.15);
    border-color: var(--header-blue);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, #1976D2 0%, #0056B3 100%);
}

.card-category {
    display: inline-block;
    background: #E3F2FD;
    color: var(--btn-blue);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-button {
    background: var(--btn-blue);
    color: var(--white);
    padding: 0.7rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.card-button:hover {
    background: var(--header-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,86,179,0.3);
}

/* GRIDS */
.tools-grid, .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* HERO */
.hero {
    background: linear-gradient(135deg, #0056B3 0%, #003d82 100%);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 { font-size: 2.2rem; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; max-width: 700px; margin: 0 auto 2.5rem; opacity: 0.95; }

.btn-primary {
    background: var(--btn-blue);
    color: var(--white);
    padding: 0.75rem 1.8rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--header-blue);
    transform: translateY(-2px);
}

/* DROPDOWN */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    background: var(--white);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 1001;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--text-dark);
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
    color: var(--btn-blue);
}

/* FOOTER */
footer {
    background: var(--footer-bg);
    color: #aaa;
    padding: 2.5rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a { color: #aaa; text-decoration: none; }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 1.5rem;
    color: #888;
    font-size: 0.85rem;
}

/* MAIN */
main { min-height: calc(100vh - 200px); padding: 0; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .tools-grid, .categories-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
    .hero h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .tools-grid, .categories-grid { grid-template-columns: 1fr; }
    .card { padding: 1.5rem 1rem; }
    .card-icon { width: 60px; height: 60px; font-size: 2rem; }
}
