/* ==========================================================================
   Secure VPN — Arco site layer
   Arco (css/plugins.css + css/style.css) is the sole visual system.
   This file adds ONLY what a multi-page Django app needs that the purchased
   theme does not ship: shared page scaffolding, Django-form rendering of the
   theme's own .form input styles, table/badge/message components, and a
   dashboard shell. All colors/typography come from Arco's own palette
   (#2AAFC0 -> #6976c5 gradient, Vazir primary font).
   ========================================================================== */

/* ---------- Shared page scaffolding ---------- */
.page-shell { padding: 64px 0 90px; }
.page-title { margin-bottom: 10px; }
.page-lead { color: #757f8c; font-size: 15px; line-height: 2; margin-bottom: 40px; }
.arco-breadcrumb { font-size: 13px; color: #909aa5; padding-top: 18px; }
.arco-breadcrumb a { color: #909aa5; }
.arco-breadcrumb a:hover { color: #2AAFC0; }

/* ---------- Card panel (theme white-box look, reused app-wide) ---------- */
.arco-card {
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
}
@media (max-width: 767px) { .arco-card { padding: 26px 20px; } }

/* ---------- Django forms rendered with Arco's .form input styles ---------- */
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="number"],
.form input[type="tel"],
.form input[type="url"],
.form input[type="search"],
.form textarea,
.form select {
    width: 100%;
    padding: 15px;
    background: #f4f4f4;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #343a40;
    margin-bottom: 5px;
}
.form input:focus, .form textarea:focus, .form select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 175, 192, 0.18);
}
.form input[disabled], .form input[readonly].form-static {
    background: #eceff1;
    color: #909aa5;
}
.form label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #353f4b;
    margin-bottom: 8px;
}
.form .form-group { margin-bottom: 20px; }
.form .arco-error {
    display: block;
    color: #d9534f;
    font-size: 13px;
    font-weight: 600;
    margin: 4px 0 10px;
}
.form .arco-help {
    display: block;
    color: #909aa5;
    font-size: 12.5px;
    margin: 2px 0 8px;
}
.ltr-input { direction: ltr; text-align: left; }

/* Theme submit button (same gradient as .contact .form .submit) */
.form .submit, a.butn.block-butn {
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    padding: 11px 10px 12px;
    color: #fff;
    background: #2AAFC0;
    background: -webkit-gradient(linear, right top, left top, from(#2AAFC0), to(#6976c5));
    background: linear-gradient(to left, #2AAFC0, #6976c5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 0;
    border-radius: 30px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}
.form .submit:hover { background: #2AAFC0; text-decoration: none; color: #fff; }

/* Social-auth action: an outlined control derived from the theme palette
   (.butn geometry, but always readable on the white auth card — the theme's
   .butn-light is white-on-dark and unreadable here) */
a.butn.block-butn {
    color: #37474f;
    background: #fff;
    border: 1.5px solid #e3e8ea;
}
a.butn.block-butn:hover { border-color: #2AAFC0; color: #2AAFC0; background: #fff; }
.auth-google span { color: #37474f; display: inline; }
.auth-google:hover span { color: #2AAFC0; }
.auth-google svg { margin-inline-end: 10px; vertical-align: middle; }

/* Auth card headings: keep the form-title scale (theme h3 in a card context),
   not the landing-page display scale */
.auth-card h1 { font-size: 22px; }
.auth-card .auth-lead { color: #78909c; font-size: 14px; margin: 6px 0 0; }
.auth-card .mt-20 { margin-top: 20px; }
.auth-card .mb-40 { margin-bottom: 40px; }

/* ---------- Divider between native and social auth ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #909aa5;
    font-size: 13px;
    font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e6e9ee;
}

/* ---------- Flash messages (Arco palette) ---------- */
.arco-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}
.arco-msg i { font-size: 16px; }
.arco-msg-success { background: rgba(42, 175, 192, 0.1); color: #0e7c8a; }
.arco-msg-error   { background: rgba(217, 83, 79, 0.08); color: #b02a37; }
.arco-msg-warning { background: rgba(255, 193, 7, 0.12); color: #8a6d00; }
.arco-msg-info, .arco-msg-debug { background: rgba(105, 118, 197, 0.1); color: #43509e; }

/* ---------- Tables (orders / dashboard / tickets) ---------- */
.table-arco { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table-arco thead th {
    background: #f6f9fa;
    color: #607d8b;
    font-weight: 700;
    font-size: 12.5px;
    padding: 13px 16px;
    border-bottom: 1px solid #e6e9ee;
    white-space: nowrap;
}
.table-arco tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #f0f3f5;
    vertical-align: middle;
    color: #4a5560;
}
.table-arco tbody tr:hover td { background: #fafcfd; }

.badge-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 30px;
    white-space: nowrap;
}
.badge-status.ok   { background: rgba(42, 175, 192, 0.12); color: #0e7c8a; }
.badge-status.bad  { background: rgba(217, 83, 79, 0.1);  color: #b02a37; }
.badge-status.wait { background: rgba(255, 193, 7, 0.14); color: #8a6d00; }

/* ---------- Payment option cards (checkout / homepage) ---------- */
.pay-option { display: block; cursor: pointer; }
.pay-option input[type=radio] { position: absolute; opacity: 0; }
.pay-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border: 1.5px solid #e6e9ee;
    border-radius: 14px;
    transition: border-color .2s, box-shadow .2s;
    height: 100%;
}
.pay-option input:checked + .pay-card {
    border-color: #2AAFC0;
    box-shadow: 0 0 0 3px rgba(42, 175, 192, 0.14);
}
.pay-option.disabled .pay-card { opacity: .55; background: #fafbfc; }
.pay-title { font-weight: 700; font-size: 15px; display: block; }
.pay-sub { font-size: 13px; color: #78909c; }

/* ---------- Result / connection-detail helpers ---------- */
.result-icon {
    width: 84px; height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin: 0 auto 20px;
}
.result-icon.ok  { background: rgba(42, 175, 192, 0.12); color: #0e7c8a; }
.result-icon.bad { background: rgba(217, 83, 79, 0.1);  color: #b02a37; }
.config-box {
    background: #10151d;
    color: #7fd6e2;
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 13px;
    word-break: break-all;
    direction: ltr;
    text-align: left;
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
}
.spam-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(105, 118, 197, 0.08);
    border: 1px solid rgba(105, 118, 197, 0.3);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13.5px;
    color: #4a5560;
    margin: 22px 0;
    text-align: right;
}
.spam-note i { color: #6976c5; margin-top: 3px; }

/* ---------- Dashboard shell (Arco tokens, in-app) ---------- */
.dash-card {
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 16px;
    padding: 28px;
    height: 100%;
}
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.dash-head h1 { font-size: 24px; margin: 0; }
.dash-sub { color: #78909c; font-size: 14px; margin: 4px 0 0; }
.traffic-bar { background: #eef1f4; border-radius: 30px; height: 8px; overflow: hidden; }
.traffic-bar > div { background: linear-gradient(to left, #2AAFC0, #6976c5); height: 100%; border-radius: 30px; }
.mono-ltr { direction: ltr; text-align: left; font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* ---------- Blog cards (Arco blog markup re-used on /blog/) ---------- */
.blog-card {
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 16px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(16, 21, 29, .09); }
.blog-card .img img { width: 100%; height: 190px; object-fit: cover; }
.blog-card .cont { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.blog-card .cont h6 { line-height: 1.9; }
.blog-card .cont h6 a { color: #10151d; }
.blog-card .cont h6 a:hover { color: #2AAFC0; }

/* ---------- Support FAQ (details/summary, keeps no-JS behavior) ---------- */
details.faq-item {
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
}
details.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 22px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item[open] summary { color: #0e7c8a; border-bottom: 1px solid #eef1f4; }
details.faq-item .faq-body {
    padding: 16px 22px;
    font-size: 14px;
    color: #546e7a;
    line-height: 1.95;
    white-space: pre-line;
}
.chip {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid #e6e9ee;
    color: #546e7a;
    margin: 4px;
}
.chip:hover, .chip.active { border-color: #2AAFC0; color: #2AAFC0; }
.chip.active { background: #2AAFC0; border-color: #2AAFC0; color: #fff; }

/* ---------- Search + pagination (blog) ---------- */
.blog-search { display: flex; gap: 10px; max-width: 480px; margin: 0 auto 30px; }
.blog-search input {
    width: 100%;
    padding: 13px 18px;
    background: #f4f4f4;
    border: 0;
    border-radius: 30px;
    font-size: 14px;
    font-family: inherit;
}
.blog-search .butn { white-space: nowrap; }
.page-link-arco {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    color: #546e7a;
    border: 1.5px solid #e6e9ee;
    margin: 0 3px;
}
.page-link-arco:hover { border-color: #2AAFC0; color: #2AAFC0; text-decoration: none; }
.page-link-arco.active { background: #2AAFC0; border-color: #2AAFC0; color: #fff; }

/* ---------- Auth pages scaffolding (form lives in an Arco .form card) ---------- */
.auth-card { max-width: 480px; margin: 0 auto; }
.auth-page { min-height: 55vh; }

/* ---------- Small utilities ---------- */
.text-brand { color: #2AAFC0; }
.mb-80 { margin-bottom: 80px; }
.gap-2 { gap: .5rem; }
.d-flex-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-pad-sm { padding: 45px 0; }

/* ---------- Document lists (terms / privacy) ---------- */
.arco-list { padding-inline-start: 20px; margin-bottom: 0; }
.arco-list li { margin-bottom: 8px; color: #4a5560; font-size: 14.5px; line-height: 1.95; }
.post-content p { color: #4a5560; font-size: 15px; line-height: 2.05; margin-bottom: 14px; }
.post-content h2, .post-content h3 { margin-top: 28px; margin-bottom: 12px; }
.post-content a { color: #1d8b9a; }
.text-dark { color: #10151d; }

/* ==========================================================================
   Structural rules for the multi-page Django site (root-cause fixes, not
   overrides): each block exists because the theme's one-page demo never
   handles this situation. Arco remains the sole design system.
   ========================================================================== */

/* Interior pages have no dark hero behind the navbar — the theme paints
   .navbar transparent with #eee links for the homepage hero only. A white
   fixed bar with dark links restores the theme's own scrolled (.nav-scroll)
   appearance on interior pages. */
.navbar.navbar-page {
    position: fixed;
    background: #fff;
    border-bottom: 1px solid rgba(12, 12, 12, .05);
}
.navbar.navbar-page .navbar-nav .nav-link { color: #222; }
.navbar.navbar-page .navbar-nav .nav-link:hover,
.navbar.navbar-page .navbar-nav .active { color: #2AAFC0; }
.navbar.navbar-page .icon-bar { color: #222; }
.navbar.navbar-page.nav-scroll { box-shadow: 0 2px 14px rgba(0, 0, 0, .06); }
body.has-page-nav { padding-top: 80px; }

/* Brand block: approved logo asset. Sizing = theme's 50px logo cap +20%:
   navbar 46px -> 55px rendered, footer scaled to match, object-fit keeps the
   2:1 aspect ratio, max-width prevents flex-shrink collapse on mobile. */
.navbar .logo { padding: 15px 0; }
.navbar .logo img.brand-logo {
    max-height: 67px;
    max-width: 218px;
    width: auto;
    height: auto;
    object-fit: contain;
}
footer .logo img.brand-logo { max-height: 67px; max-width: 218px; }

/* Interior page title area (theme has no inner-page hero; keep the same
   typographic scale as .section-head) */
.page-band { padding: 56px 0 30px; }
.page-band .section-head { margin-bottom: 0; }

/* Homepage hero: prevent RTL overflow clipping on small viewports.
   Theme sets 45px h1 at <=991px and 25px at <=767px; between 768-991px a
   45px Persian headline overflows a phone-landscape/narrow tablet; also cap
   the caption's inline buttons so the pair wraps instead of clipping. */
.header { overflow-x: hidden; }
.header .caption h1 { overflow-wrap: break-word; word-break: break-word; }
@media screen and (max-width: 991px) {
    .header .caption h1 { font-size: 32px; }
}
@media screen and (max-width: 575px) {
    .header .caption h1 { font-size: 26px; }
    .header .caption .butn { display: inline-flex; margin: 6px 4px; }
}

/* Pricing: four IDENTICAL cards. Causes of prior inconsistency:
   .price .item.active scaled the highlighted card (scale 1.05) and painted it
   with a gradient — removed by not marking any card active; equal height
   needs flex so the CTA row lands on the same baseline in every card. */
.price .pricing-tables .row { align-items: stretch; }
.price .item {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 30px;
}
.price .item .features { flex: 1 0 auto; }
.price .item.active { transform: none; }

/* Blog cards: uniform grid — same thumbnail ratio, same clamped text lines,
   action pinned to the card bottom so all cards in a row share height. */
.blog .item, .blog .item .cont { display: flex; flex-direction: column; height: 100%; }
.blog .item .post-img .img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.blog .item .cont .post-foot { margin-top: auto; padding-top: 12px; }
.blog-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer background: theme hardcodes #111 (near-black); lifted to a lighter
   charcoal from the same palette for readability and brand-logo contrast. */
footer {
    background: #37414E;
}
footer .social a { background: rgba(255, 255, 255, .12); }

/* Footer readability on the dark footer (theme default is #999 12px) */
footer .footer-links { margin: 14px 0; }
footer .footer-links a { color: #cfd8dc; font-size: 14px; margin: 0 10px; }
footer .footer-links a:hover { color: #2AAFC0; }
footer .footer-links .footer-sep { color: #455a64; margin: 0 2px; }
footer .footer-pay .badge-status { font-size: 12.5px; margin: 0 4px; }

/* RTL mobile overflow root-causes (measured at 390px):
   - Bootstrap 4 sets .btn { white-space: nowrap } -> the FAQ question buttons
     render 429px wide and force the page to scroll horizontally.
   - The long LTR English sentence inside the pricing pay-card has no break
     opportunities in RTL context -> 420px row. */
.accordion .btn-link {
    white-space: normal;
    text-align: right;
    line-height: 1.9;
}
.pay-sub[dir="ltr"] {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* RTL + fixed navbar: headless/RTL quirk leaves a phantom 25px inline scroll
   extent even with no overflowing element (verified: all elements measure
   390px, no offender). Clamp it at the root — vertical scrolling unaffected. */
html, body {
    max-width: 100%;
    overflow-x: clip;
}
