/* === Navigation Dropdown === */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-dark);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-dropdown-toggle:hover {
    color: var(--avito-blue);
    text-decoration: none;
}

.nav-arrow {
    font-size: 11px;
    transition: transform 0.2s;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 240px;
    padding: 8px 0;
    z-index: 1200;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: var(--bg-white);
    border-top: none;
}

.nav-dropdown-menu::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--avito-blue);
    text-decoration: none;
}

.nav-dropdown-menu a:first-child {
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
    padding-bottom: 12px;
}

/* === Articles Grid === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.article-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 28px 32px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.article-card-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 12px;
    background: #E3F2FD;
    color: var(--avito-blue);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.article-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-card-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.article-card-title a:hover {
    color: var(--avito-blue);
}

.article-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 16px;
    flex: 1;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.article-card-date {
    font-size: 13px;
    color: var(--text-light);
}

.article-card-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--avito-blue);
    text-decoration: none;
}

.article-card-link:hover {
    text-decoration: underline;
}

/* === Guides Grid === */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.guide-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 32px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s, transform 0.2s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.guide-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: var(--avito-blue);
    text-decoration: none;
}

.guide-card-num {
    font-size: 36px;
    font-weight: 700;
    color: var(--avito-blue);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 16px;
}

.guide-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.guide-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 16px;
    flex: 1;
}

.guide-card-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--avito-blue);
}

/* === Breadcrumbs === */
.breadcrumbs {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--text-gray);
}

.breadcrumbs a:hover {
    color: var(--avito-blue);
}

/* === Filter reset button === */
.btn-filter-reset {
    display: block;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    color: var(--text-gray);
    font-size: 14px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-filter-reset:hover {
    border-color: var(--avito-blue);
    color: var(--avito-blue);
    text-decoration: none;
}

/* === Product buttons === */
.btn-details,
.btn-buy {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-details {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-details:hover {
    background: var(--border-color);
    text-decoration: none;
}

.btn-buy {
    background: var(--avito-blue);
    color: white;
}

.btn-buy:hover {
    background: #0099e6;
    text-decoration: none;
}

/* === Mobile dropdown === */
@media (max-width: 768px) {
    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin: 0;
        padding: 0 0 0 20px;
        min-width: auto;
        display: none;
    }

    .nav-dropdown-menu::before,
    .nav-dropdown-menu::after {
        display: none;
    }

    .header-nav.active .nav-dropdown-menu {
        display: block;
    }

    .nav-dropdown {
        border-bottom: 1px solid var(--border-color);
        padding: 0;
    }

    .nav-dropdown-toggle {
        padding: 14px 0;
        font-size: 18px;
        width: 100%;
        justify-content: space-between;
    }

    .nav-dropdown-menu a {
        padding: 10px 0;
        font-size: 15px;
        border-bottom: none;
    }

    .nav-dropdown-menu a:first-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 10px;
    }

    .nav-dropdown-menu a:hover {
        background: none;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .guides-grid {
        grid-template-columns: 1fr;
    }

    .article-card {
        padding: 20px 24px;
    }
}

/* === Info banner responsive (index page) === */
.info-banner-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.info-banner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-banner-heading {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-banner-text {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

.info-banner-mobile {
    display: none;
}

@media (max-width: 768px) {
    .info-banner-grid {
        display: none;
    }

    .info-banner-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
        font-size: 14px;
    }

    .info-banner-title {
        font-size: 18px;
        margin-bottom: 14px;
    }
}

/* === Guarantees bar === */
.guarantees-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.guarantee-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--bg-white);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.guarantee-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.guarantee-item span {
    font-size: 13px;
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .guarantees-bar {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* === Roadmap === */
.roadmap-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.roadmap-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 24px;
}

.roadmap {
    position: relative;
    padding-left: 40px;
}

.roadmap::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.roadmap-step {
    position: relative;
    margin-bottom: 24px;
    cursor: pointer;
}

.roadmap-dot {
    position: absolute;
    left: -40px;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--avito-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.roadmap-dot span {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.roadmap-content {
    background: var(--bg-white);
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.roadmap-content strong {
    font-size: 16px;
    display: block;
    margin-bottom: 6px;
}

.roadmap-content p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, margin 0.3s;
    margin: 0;
}

.roadmap-step.active .roadmap-content p {
    max-height: 200px;
    margin-top: 8px;
}

/* === Profile dropdown === */
.profile-dropdown {
    position: relative;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 14px;
}

.profile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 8px 0;
    z-index: 1200;
}

.profile-dropdown.open .profile-menu {
    display: block;
}

.profile-menu-email {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-gray);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.profile-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-dark);
    font-size: 14px;
}

.profile-menu a:hover {
    background: var(--bg-light);
    text-decoration: none;
}

/* === Resource Hub Page === */
.resource-section {
    margin-bottom: 48px;
}

.resource-section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.resource-section-desc {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.5;
}

.resource-tiles {
    display: grid;
    gap: 16px;
}

.resource-tiles--2 {
    grid-template-columns: repeat(2, 1fr);
}

.resource-tiles--3 {
    grid-template-columns: repeat(3, 1fr);
}

.resource-tile {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 24px 28px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative;
}

.resource-tile:hover {
    border-color: var(--avito-blue);
    box-shadow: 0 4px 16px rgba(0, 170, 255, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.resource-tile-label {
    display: inline-block;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--avito-blue);
    background: #E3F2FD;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 12px;
}

.resource-tile h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.resource-tile p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-gray);
    flex: 1;
}

.resource-tile-source {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-light);
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

/* Accent tiles (guides) */
.resource-tile--accent {
    border-left: 3px solid var(--avito-blue);
}

.resource-tile--accent .resource-tile-label {
    background: var(--avito-blue);
    color: white;
}

/* Dark tiles (analytics/cases) */
.resource-tile--dark {
    background: #1a1a2e;
    border-color: #2a2a3e;
    color: white;
}

.resource-tile--dark:hover {
    border-color: var(--avito-blue);
    box-shadow: 0 4px 20px rgba(0, 170, 255, 0.15);
    color: white;
}

.resource-tile--dark h3 {
    color: white;
}

.resource-tile--dark p {
    color: rgba(255, 255, 255, 0.7);
}

.resource-tile--dark .resource-tile-label {
    background: rgba(0, 170, 255, 0.2);
    color: #5cc8ff;
}

/* External tiles */
.resource-tile--external {
    border-style: dashed;
}

.resource-tile--external .resource-tile-label {
    background: #F0F0F0;
    color: var(--text-gray);
}

@media (max-width: 1024px) {
    .resource-tiles--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .resource-tiles--2,
    .resource-tiles--3 {
        grid-template-columns: 1fr;
    }

    .resource-tile {
        padding: 20px 22px;
    }

    .resource-section {
        margin-bottom: 36px;
    }

    .resource-section-title {
        font-size: 19px;
    }
}

/* ============================================
   ARTICLE PAGE — Professional Design Override
   ============================================ */

/* Override content-page for articles/guides */
.content-page {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* Article header area */
.content-page .info-block:first-child {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
    overflow: hidden;
}

/* Article title (h2 inside first info-block) */
.content-page .info-block:first-child > h2:first-child {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
    color: #111;
    margin: 0 0 28px 0;
    padding: 48px 52px 0;
    border-bottom: none;
}

/* First paragraph — lead/intro style */
.content-page .info-block:first-child > h2:first-child + p {
    font-size: 18px;
    line-height: 1.7;
    color: #444;
    padding: 0 52px;
    margin-bottom: 32px;
    border-left: 3px solid var(--avito-blue);
    padding-left: 20px;
    margin-left: 52px;
    padding-right: 0;
}

/* All info-blocks in content-page */
.content-page .info-block {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 48px 52px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Section headings h3 */
.content-page .info-block h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-top: 32px;
    border-top: 1px solid #eee;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.content-page .info-block h3:first-child,
.content-page .info-block h2 + h3,
.content-page .info-block h2:first-child + p + h3 {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Paragraph styling */
.content-page .info-block p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 18px;
    max-width: none;
}

/* Lists */
.content-page .info-block ul,
.content-page .info-block ol {
    margin: 20px 0 24px;
    padding: 0;
    list-style: none;
}

.content-page .info-block ol {
    counter-reset: article-list;
}

.content-page .info-block li {
    position: relative;
    font-size: 16px;
    line-height: 1.75;
    color: #333;
    margin-bottom: 12px;
    padding-left: 28px;
}

.content-page .info-block ul > li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--avito-blue);
}

.content-page .info-block ol > li::before {
    counter-increment: article-list;
    content: counter(article-list);
    position: absolute;
    left: 0;
    top: 1px;
    width: 22px;
    height: 22px;
    background: var(--avito-blue);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-page .info-block ol > li {
    padding-left: 34px;
}

/* Bold text inside lists */
.content-page .info-block li strong {
    color: #111;
    font-weight: 600;
}

/* Links inside articles */
.content-page .info-block a {
    color: var(--avito-blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 170, 255, 0.3);
    transition: border-color 0.2s;
}

.content-page .info-block a:hover {
    border-bottom-color: var(--avito-blue);
    text-decoration: none;
}

/* h2 inside article (section titles, not the first one) */
.content-page .info-block h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--avito-blue);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

/* "Читайте также" block — last info-block */
.content-page .info-block:last-child {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    border: 1px solid rgba(0, 170, 255, 0.15);
    border-radius: 12px;
    padding: 36px 44px;
}

.content-page .info-block:last-child h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--avito-blue);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
}

.content-page .info-block:last-child ul {
    margin: 0;
}

.content-page .info-block:last-child li {
    margin-bottom: 8px;
    padding-left: 0;
}

.content-page .info-block:last-child li::before {
    display: none;
}

.content-page .info-block:last-child a {
    font-size: 15px;
    font-weight: 500;
    color: var(--avito-blue);
    border-bottom: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s;
}

.content-page .info-block:last-child a:hover {
    transform: translateX(4px);
}

.content-page .info-block:last-child a::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 2px solid var(--avito-blue);
    border-top: 2px solid var(--avito-blue);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* Warning blocks */
.content-page .info-block.warning {
    border-left: 4px solid #F57C00;
    background: #FFFAF0;
    border-radius: 8px;
}

.content-page .info-block.warning h3 {
    color: #BF360C;
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Breadcrumbs spacing override */
.container > .breadcrumbs {
    margin-bottom: 24px;
}

/* === Article page responsive === */
@media (max-width: 768px) {
    .content-page {
        padding-bottom: 30px;
    }

    .content-page .info-block {
        padding: 28px 24px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .content-page .info-block:first-child > h2:first-child {
        font-size: 24px;
        padding: 28px 24px 0;
    }

    .content-page .info-block:first-child > h2:first-child + p {
        font-size: 16px;
        padding: 0 24px;
        margin-left: 24px;
        padding-left: 16px;
    }

    .content-page .info-block h3 {
        font-size: 18px;
        margin-top: 28px;
        padding-top: 24px;
    }

    .content-page .info-block p,
    .content-page .info-block li {
        font-size: 15px;
    }

    .content-page .info-block h2 {
        font-size: 20px;
    }

    .content-page .info-block:last-child {
        padding: 24px;
    }

    .content-page .info-block:last-child h2 {
        font-size: 16px;
    }
}
