/* ================================================================
   layout.css — Navbar + Footer (public pages, RTL Persian)
   Brand: #1a1040  Accent: #6610f2
   ================================================================ */

/* ---------- Base ---------- */
body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #f8f9fc;
    color: #1e1e2d;
}

/* ---------- NAVBAR ---------- */
.main-navbar {
    background: #1a1040;
    padding: .75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow .3s ease, background .3s ease;
}

.main-navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, .35);
    background: #100b28;
}

/* Brand */
.navbar-brand-custom {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #fff !important;
    font-size: 1.3rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -.3px;
}

.navbar-brand-custom .brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #6610f2, #8a40f8);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.navbar-brand-custom .brand-text {
    color: #fff;
}

/* Nav links */
.main-navbar .nav-link-custom {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: rgba(255, 255, 255, .75) !important;
    font-size: .95rem;
    font-weight: 500;
    padding: .45rem .9rem !important;
    border-radius: 8px;
    transition: color .2s, background .2s;
    text-decoration: none;
}

.main-navbar .nav-link-custom:hover,
.main-navbar .nav-link-custom.active {
    color: #fff !important;
    background: rgba(255, 255, 255, .1);
}

/* Auth Button */
.btn-nav-auth {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: linear-gradient(135deg, #6610f2, #8a40f8);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    padding: .45rem 1.25rem;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .2s, transform .1s;
    white-space: nowrap;
}

.btn-nav-auth:hover {
    opacity: .9;
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-nav-panel {
    background: linear-gradient(135deg, #0f7b4b, #20c997);
}

/* ---------- Products Dropdown ---------- */
.nav-dropdown-toggle { cursor: pointer; }

.nav-caret {
    font-size: .65rem;
    margin-right: .3rem;
    transition: transform .2s;
}

.nav-item.dropdown.show .nav-caret { transform: rotate(180deg); }

.products-dropdown-menu {
    min-width: 300px;
    padding: .5rem;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
    background: #fff;
    margin-top: .5rem !important;
}

.products-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: .6rem .75rem;
    border-radius: 10px;
    color: #1a1040;
    text-decoration: none;
    transition: background .15s;
}

.products-dropdown-item:hover {
    background: #f5f3ff;
    color: #1a1040;
    text-decoration: none;
}

.product-dd-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.product-dd-info {
    flex: 1;
    min-width: 0;
}

.product-dd-name {
    display: block;
    font-weight: 700;
    font-size: .88rem;
    color: #1a1040;
    line-height: 1.3;
}

.product-dd-sub {
    display: block;
    font-size: .76rem;
    color: #6c757d;
    line-height: 1.3;
    margin-top: 1px;
}

.product-dd-soon {
    font-size: .7rem;
    color: #d97706;
    background: rgba(245, 158, 11, .1);
    border: 1px solid rgba(245, 158, 11, .3);
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.products-dropdown-item.coming-soon .product-dd-icon { opacity: .55; }
.products-dropdown-item.coming-soon .product-dd-name { color: #868e96; }

.products-dd-footer {
    display: block;
    text-align: center;
    padding: .5rem;
    font-size: .83rem;
    font-weight: 600;
    color: #6610f2;
    text-decoration: none;
    border-radius: 8px;
    transition: background .15s;
}

.products-dd-footer:hover {
    background: #f5f3ff;
    color: #4c0fbf;
}

/* Toggler */
.main-navbar .navbar-toggler {
    border: 1.5px solid rgba(255, 255, 255, .3);
    border-radius: 8px;
    padding: .35rem .55rem;
}

.main-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile collapse nav */
@media (max-width: 991.98px) {
    .main-navbar .navbar-collapse {
        background: #120d30;
        border-radius: 12px;
        margin-top: .75rem;
        padding: 1rem;
    }

    .main-navbar .nav-link-custom {
        padding: .6rem 1rem !important;
        display: block;
    }

    .btn-nav-auth {
        display: inline-block;
        margin-top: .5rem;
        width: 100%;
        text-align: center;
    }
}

/* ---------- FOOTER ---------- */
.main-footer {
    background: #1a1040;
    color: rgba(255, 255, 255, .7);
    padding: 4rem 0 0;
    margin-top: 5rem;
}

.footer-brand-area .footer-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-brand-area .footer-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6610f2, #8a40f8);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    color: #fff;
    flex-shrink: 0;
}

.footer-brand-area p {
    color: rgba(255, 255, 255, .55);
    font-size: .9rem;
    line-height: 1.8;
}

.footer-col-title {
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: .6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    font-size: .9rem;
    transition: color .2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .85rem;
    font-size: .9rem;
}

.footer-contact-item i {
    width: 32px;
    height: 32px;
    background: rgba(102, 16, 242, .25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a78bfa;
    font-size: .85rem;
    flex-shrink: 0;
}

.footer-contact-item a {
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    transition: color .2s;
}

.footer-contact-item a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 1.25rem 0;
    margin-top: 3rem;
    text-align: center;
    color: rgba(255, 255, 255, .4);
    font-size: .82rem;
}

/* ---------- Shared Utilities ---------- */
.bg-primary-soft { background: #dbeafe; }
.bg-success-soft { background: #dcfce7; }
.bg-info-soft    { background: #cffafe; }
.bg-warning-soft { background: #fef9c3; }
.bg-danger-soft  { background: #fee2e2; }
.bg-purple-soft  { background: #ede9fe; }
.text-purple     { color: #7c3aed; }

/* RTL nav alignment fixes */
.me-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}
