/* ==========================================
   ۱. تنظیمات پایه و عمومی (Reset & Base)
   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0b1120;
    color: #e2e8f0;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================
   ۲. استایل هدر و باکس جستجو (Header & Search)
   ========================================== */
.site-header {
    background-color: #0d1b2a;
    padding: 12px 20px;
    position: relative;
    z-index: 1000;
    width: 100%;
    border-bottom: 3px solid #00b4d8;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    position: relative;
    flex-wrap: nowrap;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo span {
    color: #00b4d8;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #1b263b;
    border: 1px solid #415a77;
    border-radius: 6px;
    padding: 6px 12px;
    width: 240px;
    flex-shrink: 0;
}

.search-box:focus-within {
    border-color: #00b4d8;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.search-box i {
    color: #00b4d8;
    font-size: 13px;
    margin-right: 8px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 13px;
    width: 100%;
}

.search-box input::placeholder {
    color: #8d99ae;
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: #0f172a;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid #334155;
    z-index: 2000;
    max-height: 350px;
    overflow-y: auto;
}

.search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-results li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    color: #e2e8f0;
    font-size: 14px;
    border-bottom: 1px solid #1e293b;
    transition: background-color 0.2s;
}

.search-results li:last-child a {
    border-bottom: none;
}

.search-results li a:hover {
    background-color: #1e293b;
    color: #00b4d8;
}

.search-results li a small {
    color: #94a3b8;
    font-size: 11px;
}

.search-results .no-result {
    padding: 12px 16px;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

/* ==========================================
   ۳. نوار منوی اصلی و افقی (Navigation Bar)
   ========================================== */
.nav-menu {
    display: flex;
    align-items: center;
    flex-shrink: 1;
}

.main-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.menu-item {
    position: static !important;
}

.menu-link {
    color: #ffffff;
    padding: 8px 12px;
    display: block;
    font-weight: 600;
    font-size: 12px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.menu-link:hover,
.menu-item:hover .menu-link {
    background-color: #00b4d8;
    color: #ffffff;
}

.menu-link i {
    font-size: 11px;
    margin-left: 3px;
}

/* ==========================================
   ۴. استایل مگامنو تمام‌صفحه (Full-Width Mega Menu)
   ========================================== */
.mega-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #0f172a;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-top: 3px solid #00b4d8;
    border-bottom: 1px solid #334155;
    z-index: 1005;
    padding: 30px 0;
    box-sizing: border-box;
    margin-top: 12px;
}

.mega-dropdown::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.mega-dropdown-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between;
    gap: 20px;
    overflow-x: auto;
    max-height: 70vh;
}

.subcategory-column {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.menu-item:hover .mega-dropdown {
    display: block;
}

.subcategory-column h4 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #334155;
    text-transform: uppercase;
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tools-list li a {
    font-size: 13.5px;
    color: #94a3b8;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.tools-list li a:hover {
    color: #00b4d8;
    padding-left: 5px;
}

/* ==========================================
   ۵. استایل عمومی و یکپارچه ابزارها (Container & Calculator Grid)
   ========================================== */
.container {
    max-width: 950px;
    margin: 40px auto;
    padding: 35px;
    background: #0f172a;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid #1e293b;
    color: #e2e8f0;
}

.container > h1, 
.page-container h1 {
    font-size: 30px;
    margin-bottom: 8px;
    color: #ffffff;
    border-bottom: 3px solid #00b4d8;
    padding-bottom: 10px;
}

.container .divider {
    display: none;
}

.container .subtitle {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    border-bottom: 1px solid #334155;
    padding-bottom: 30px;
}

@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.calc-inputs .form-group {
    margin-bottom: 0;
}

.calc-inputs .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #cbd5e1;
    font-size: 13px;
}

.calc-inputs .input-wrapper {
    display: flex;
    align-items: center;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 2px 10px;
}

.calc-inputs .input-wrapper span {
    color: #94a3b8;
    margin-right: 5px;
}

.calc-inputs .input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    padding: 10px 0;
    font-size: 14px;
}

.calc-inputs .input-wrapper input:focus {
    border-color: #00b4d8;
}

.reset-btn {
    margin-top: 10px;
    width: 100%;
    background-color: #00b4d8;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.reset-btn:hover {
    background-color: #0077b6;
}

/* پنل نتایج سمت راست */
.results-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
}

.results-card .result-item {
    border-bottom: 1px solid #334155;
    padding-bottom: 12px;
}

.results-card .result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.results-card .result-label {
    font-size: 11px;
    font-weight: bold;
    color: #94a3b8;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.results-card .result-value {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
}

.results-card .result-value.highlight {
    font-size: 20px;
    color: #ffffff;
}

/* ==========================================
   ۶. استایل عمومی و یکپارچه برای بخش About Us در تمام ابزارها
   ========================================== */
.container .tool-about-section,
.container section {
    margin-top: 30px !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

 .tool-about-section{
    background-color: rgb(15, 23, 42) !important;
    max-width: 955px !important;
 }
 .tool-about-section h2{
    border-bottom:3px solid #00b4d8 !important ;
 }
.tool-about-section h2,.tool-about-section h3{
    color: #00b4d8 !important;
}
.tool-about-section p, .tool-about-section li{
    color: white !important;
}
select{
     background: #1e293b !important;
     color: white !important;
}



.container .tool-about-section h2,
.container section h2 {
    color: #ffffff !important;
    font-size: 18px !important;
    margin-bottom: 10px !important;
    font-weight: bold !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.container .tool-about-section p,
.container section p {
    color: #94a3b8 !important;
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
    font-size: 13px !important;
}

.container .tool-about-section h3,
.container section h3 {
    color: #00b4d8 !important;
    font-size: 14px !important;
    margin-top: 20px !important;
    margin-bottom: 8px !important;
    font-weight: bold !important;
}

.container .tool-about-section ul,
.container section ul {
    color: #94a3b8 !important;
    line-height: 1.6 !important;
    padding-left: 20px !important;
    margin-bottom: 15px !important;
    font-size: 13px !important;
}

.container .tool-about-section ul li,
.container section ul li {
    margin-bottom: 6px !important;
}

/* ==========================================
   ۷. استایل فوتر سایت (Footer)
   ========================================== */
.site-footer {
    background-color: #0d1b2a;
    color: #e2e8f0;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 3px solid #00b4d8;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00b4d8;
}

.copyright {
    font-size: 13px;
    color: #94a3b8;
}

.copyright strong {
    color: #ffffff;
}

/* ==========================================
   ۸. ریسپانسیو حرفه‌ای برای موبایل و تبلت
   ========================================== */
@media screen and (max-width: 1070px) {
    .header-container {
        flex-direction: column !important;
        align-items: center !important;
        padding: 12px !important;
    }

    .logo {
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 4px;
    }

    .search-box {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 8px;
    }

    .nav-menu {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }

    .main-menu {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
        width: 100% !important;
        max-width: 420px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        list-style: none !important;
        flex-direction: unset !important;
    }

    .menu-item {
        position: static !important;
        text-align: center !important;
    }

    .menu-link {
        display: block !important;
        padding: 6px 4px !important;
        font-size: 0.78rem !important;
        background: #1e293b !important;
        border-radius: 6px !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .mega-dropdown {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 10px !important;
    }

    .mega-dropdown-inner {
        flex-direction: column !important;
        gap: 10px !important;
        max-height: 55vh !important;
        overflow-y: auto !important;
    }

    .container {
        margin: 15px;
        padding: 20px;
    }
}


