/* Reset and base */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #222;
    direction: ltr;
}

body.logged-in {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.layout-wrapper {

    display: flex;
    flex: 1;
    height: calc(100vh - 80px);
    overflow: hidden;
    position: relative;
}

.sidebar {
    width: 220px;
    background: #111;
    padding: 30px 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(0);
    transition: transform 0.3s ease;
    z-index: 2;
}


/* سایدبار بسته */
#sidebar-toggle:not(:checked) ~ .layout-wrapper .sidebar {
    transform: translateX(-240px);
}

/* جابه‌جایی main هنگام بسته بودن سایدبار */
#sidebar-toggle:not(:checked) ~ .layout-wrapper main,
#sidebar-toggle:not(:checked) ~ .layout-wrapper footer {
    margin-left: 0;
}

body.logged-in .layout-wrapper main,
body.logged-in .layout-wrapper footer {
    margin-left: 220px;
    transition: margin-left 0.3s ease;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar nav a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.sidebar nav a:hover {
    text-decoration: underline;
}

header {
    background-color: #000;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    z-index: 3;
    position: relative;
}

header img {
    height: 50px;
    width: auto;
}

header h1 {
    color: white;
    font-weight: 600;
    font-size: 22px;
    margin: 0;
    user-select: none;
}

main {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px 50px;
    background-color: #f0f2f5;
    height: 100%;
}

footer {
    text-align: center;
    font-size: 14px;
    color: #555;
    user-select: none;
    padding: 20px 0;
    background: #f9f9f9;
}

footer a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

.page-container {
    max-width: 100%;
    margin: auto;
    background-color: white;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.12);

}

.dashboard-container {
    max-width: 100%;
    background: none;
    box-shadow: none;
    padding: 0;
}

.hamburger {
    margin-right: 20px;
    font-size: 20px;
    background: #000;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}


/* فرم و المان‌ها */
h2 {
    margin-top: 0;
    color: #111;
    font-weight: 600;
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
    user-select: none;
}

form label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 8px;
    margin-top: 20px;
    user-select: none;
}

form input[type="text"],
form input[type="email"],
form input[type="file"],
form textarea {
    width: 100%;

    padding: 12px 15px;
    font-size: 15px;
    border-radius: 6px;
    border: 1.8px solid #ccc;
    transition: border-color 0.25s ease;
    resize: vertical;
    font-family: inherit;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="file"]:focus,
form textarea:focus {
    border-color: #000;
    outline: none;
}

textarea {
    min-height: 100px;
    line-height: 1.6;
}

.note {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    user-select: none;
}

/* دکمه‌ها */
.btn-custom {
    margin-top: 30px;
    background-color: #000000;
    color: #fff;
    border: none;
    padding: 14px 0;
    font-size: 17px;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.btn-custom:hover {
    background-color: #333333;
}

/* بخش پیگیری */
.tracking-section {
    margin-top: 40px;
    border-top: 1px solid #ddd;
    padding-top: 30px;
}

.tracking-section label {
    margin-top: 0;
}

.tracking-btn {
    background-color: #444;
    margin-top: 10px;
    padding: 12px 0;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    border: none;
    width: 100%;
    transition: background-color 0.3s ease;
}

.tracking-btn:hover {
    background-color: #222;
}

/* پیام‌ها */
.message {
    margin-top: 20px;
    font-size: 16px;
    color: #444;
    text-align: center;
}

.error {
    color: #e74c3c;
}

.status {
    font-weight: 700;
    color: #27ae60;
}

/* استایل خطاهای فرم */
.errorlist {
    color: #e74c3c;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 14px;
    list-style-type: none;
    padding-left: 0;
}

.errorlist li {
    margin-left: 0;
}

.nonfield-errors {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 15px;
}

.form_tools {
    max-width: 50%;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border-radius: 6px;
    border: 1.8px solid #ccc;
    transition: border-color 0.25s ease;
    font-family: inherit;
    padding-right: 42px; /* جا برای آیکون چشم */
}

.password-wrapper input:focus {
    border-color: #000;
    outline: none;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 18px;
}

#floating-alert-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.floating-alert {
    position: relative;
    background-color: #f8d7da;
    color: #721c24;
    padding: 14px 18px 20px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid #f5c6cb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 360px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.floating-alert.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.close-alert {
    position: absolute;
    top: 1px;
    right: 10px;
    font-size: 18px;
    font-weight: bold;
    color: inherit;
    cursor: pointer;
}

.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: #dc3545; /* danger red */
    animation: alertProgress 4s linear forwards;
}

.floating-alert.success .alert-progress {
    background-color: #28a745; /* green */
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-left: 8px;
    vertical-align: middle;
}

.user-hover {
    position: relative;
    display: inline-block;
}

.profile-hover-box {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 8px;
    width: 250px;
    display: none;
    z-index: 1002;
}

.profile-hover-box form label {
    font-size: 14px;
    margin-top: 10px;
    color: #444;
}

.profile-hover-box form input {
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
}

.profile-hover-box .btn {
    margin-top: 12px;
    width: 100%;
}

.user-hover:hover .profile-hover-box {
    display: block;
}

.subscription-box {
    background-color: #f9f9f9;
    border-left: 4px solid #27ae60;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 15px;
}

.subscription-box strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}


@keyframes alertProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Responsive */
@media (max-width: 480px) {
    main {
        padding: 25px 20px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
        position: relative;
    }

    .layout-wrapper {
        position: relative;
    }

    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        width: 240px;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        background-color: #111;
        z-index: 100;
    }

    #sidebar-toggle:checked ~ .layout-wrapper .sidebar {
        transform: translateX(0);
    }

    .layout-wrapper {
        flex-direction: column;
    }

    body.logged-in .layout-wrapper main,
    body.logged-in .layout-wrapper footer {
        margin-left: 0;
    }

    main {
        padding: 20px 15px;
    }

    .page-container {
        padding: 20px 15px;
        box-shadow: none;
    }

    header h1 {
        font-size: 15px;
    }

    .form_tools {
        max-width: 100%;
    }
}

/* Home - hero */
.hero-wrapper {
    background: linear-gradient(180deg, #f8f9fa, #ffffff);
    border-bottom: 1px solid #eee;
}

.hero-inner {
    max-width: 980px;
    margin: 28px auto;
    text-align: center;
    padding: 24px 16px 8px;
}

.hero-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    opacity: .9;
    margin-bottom: 8px;
}

.hero-title {
    font-size: 22px;
    margin: 0;
}

.hero-subtitle {
    color: #555;
    margin: 6px 0 18px;
}

/* CTA group */
.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Reusable cards */
.feature-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 0 12px rgba(0, 0, 0, .06);
}

.feature-card i {
    font-size: 22px;
}

.feature-card h5 {
    margin: 10px 0 6px;
}

/* How it works */
.hiw {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .hiw {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.hiw-step {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hiw-index {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* Section headings */
.section-title {
    font-size: 18px;
    margin-bottom: 14px;
}

/* CTA strip */
.cta-strip {
    border: 1px dashed #ddd;
    border-radius: 12px;
    margin-top: 28px;
}

.home-banner {
    max-width: 980px;
    margin: 12px auto;
}

.hero-wrapper {
    background: linear-gradient(180deg, #f8f9fa, #ffffff);
    border-bottom: 1px solid #eee;
}

.hero-inner {
    max-width: 980px;
    margin: 28px auto;
    text-align: center;
    padding: 24px 16px 12px;
}

.hero-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    opacity: .9;
    margin-bottom: 8px;
}

.hero-title {
    font-size: 24px;
    margin: 0;
}

.hero-subtitle {
    color: #555;
    margin: 6px 0 18px;
}

.hero-ctas {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.trust-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
    color: #555;
    font-size: 13px;
}

.trust-row i {
    margin-right: 4px;
}

.section-title {
    font-size: 18px;
    margin-bottom: 14px;
}

.feature-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 0 12px rgba(0, 0, 0, .06);
}

.feature-card h3 {
    font-size: 16px;
    margin: 8px 0 6px;
}

.feature-card i {
    font-size: 22px;
}

.hiw {
    display: grid;
    gap: 14px;
    grid-template-columns:1fr;
}

@media (min-width: 768px) {
    .hiw {
        grid-template-columns:1fr 1fr 1fr;
    }
}

.hiw-step {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hiw-index {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.plan-card .card-title {
    font-weight: 600;
}

.xsmall {
    font-size: 12px;
}

.quote-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    font-style: italic;
    box-shadow: 0 0 12px rgba(0, 0, 0, .04);
}

.quote-card footer {
    margin-top: 8px;
    font-style: normal;
    color: #666;
    font-size: 13px;
}

.cta-strip {
    border: 1px dashed #ddd;
    border-radius: 12px;
    margin-top: 28px;
    padding: 12px 16px;
}

/* Article title box: wrap, justify, no scrollbar */
.article-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* show up to 3 lines, then clip (no scroll) */
    overflow: hidden;
    text-align: justify;
    line-height: 1.35;
    word-break: break-word;
    hyphens: auto;
    font-size: .95rem;
    padding: .6rem .75rem;
    border: 1px solid #ced4da;
    border-radius: .375rem;
    background: #f8f9fa;
}

/* keep stars on the left */
.star-row {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

/* star rating (unchanged behavior) */
.star-rating {
    display: inline-flex !important;
    direction: ltr;
    flex-direction: row-reverse;
    gap: .35rem;
    white-space: nowrap;
    line-height: 1;
    align-items: center;
}

.star-rating input {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    pointer-events: none !important;
}

.star-rating label {
    display: inline-block !important;
    cursor: pointer;
    user-select: none;
    font-size: 1.8rem;
    color: #c7c7c7;
    transition: transform .08s ease, color .12s ease;
}

.star-rating label:hover, .star-rating label:hover ~ label {
    color: #ffcc33;
    transform: scale(1.05);
}

.star-rating input:checked ~ label {
    color: #ffcc33;
}
/* Main header container */
.main-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    background: #000; /* مشکی برند */
    color: white;
    height: 64px;
}

/* Logo + divider + title */
.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

/* Logo */
.header-logo {
    height: 34px;
    width: auto;
    filter: brightness(0) invert(1); /* تبدیل لوگو به سفید */
}

/* Divider */
.header-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.25);
}

/* Title */
.header-title {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.4px;
    color: #f2f2f2;
    white-space: nowrap;
}

/* User info */
.header-user {
    margin-left: auto;
    color: white;
    font-size: 14px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-user-icon {
    font-size: 18px;
}

.header-username {
    font-size: 14px;
}
/* Footer container */
.site-footer {
    background: #000; /* تیره مثل هدر */
    color: #ddd;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid #222;
}

/* Columns wrapper */
.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

/* Individual column */
.footer-col {
    flex: 1;
    min-width: 260px;
}

/* Footer logo */
.footer-logo {
    height: 40px;
    filter: brightness(0) invert(1); /* تبدیل به سفید */
    margin-bottom: 12px;
}

/* Powered by text */
.footer-powered {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 14px;
    color: #bfbfbf;
}

/* © copy text */
.footer-copy {
    font-size: 12px;
    color: #888;
}

/* Column titles */
.footer-col h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 12px;
}

/* Links and list */
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 10px;
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
}

/* Footer links */
.site-footer a {
    color: #9fd4ff;
    text-decoration: none;
    transition: 0.2s;
}

.site-footer a:hover {
    color: #c6e7ff;
}

/* Responsive on mobile */
@media(max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 28px;
    }
}
footer, .site-footer {
    margin-top: auto !important;
}

.scroll-hint {
    position: fixed;
    right: 28px;
    bottom: 95px; /* هماهنگ با ارتفاع فوتر */
    z-index: 9999;

    /* بدون پس‌زمینه - فقط آیکن */
    color: white;
    font-size: 32px;   /* 🌟 بزرگ‌تر */
    opacity: 0.85;

    cursor: pointer;
    transition: opacity 0.3s ease;

    animation: scrollBounce 1.4s infinite;
}

/* انیمیشن مینیمال */
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* وقتی باید محو شود */
.scroll-hint.hide {
    opacity: 0;
    pointer-events: none;
}

