/* ============================================================
   AVELEC.ru Inner Pages Styles v4.0
   Clean White Russian B2B Electronics
   Shared styles for all inner page templates
   ============================================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
    --av-bg-primary: #ffffff;
    --av-bg-secondary: #f5f7fa;
    --av-bg-card: #ffffff;
    --av-accent: #1a5276;
    --av-accent-hover: #2471a3;
    --av-accent-light: #eaf2f8;
    --av-text-primary: #1a1a2e;
    --av-text-secondary: #4a5568;
    --av-border: #d2d6dc;
    --av-border-light: #e2e8f0;
    --av-success: #27ae60;
    --av-radius: 4px;
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.avelec-page {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--av-text-primary);
    background: var(--av-bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.avelec-page h1,
body.avelec-page h2,
body.avelec-page h3,
body.avelec-page h4 {
    font-family: 'PT Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.av-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- HEADER (smtproline-style: single row) ---------- */
.av-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--av-bg-primary);
    border-bottom: 1px solid var(--av-border);
}

.av-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 64px;
}

.av-header__logo {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--av-text-primary);
    flex-shrink: 0;
    white-space: nowrap;
}

.av-header__nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    margin-left: 20px;
}

.av-header__nav a {
    font-size: 14px;
    font-weight: 400;
    color: var(--av-text-secondary);
    padding: 8px 16px;
    white-space: nowrap;
    border-radius: var(--av-radius);
}

.av-header__nav a:hover {
    color: var(--av-accent);
    background: var(--av-bg-secondary);
}

.av-header__phone-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #22c55e;
    padding: 10px 20px;
    border-radius: var(--av-radius);
    flex-shrink: 0;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.av-header__phone-btn:hover {
    background: #16a34a;
}

.av-header__phone-btn svg { flex-shrink: 0; }

.av-header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.av-header__burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--av-text-primary);
    border-radius: 1px;
}

.av-header__burger--active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.av-header__burger--active span:nth-child(2) {
    opacity: 0;
}
.av-header__burger--active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.av-header__nav--open {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--av-bg-primary);
    padding: 24px;
    gap: 0;
    z-index: 999;
    border-top: 1px solid var(--av-border);
    overflow-y: auto;
}

.av-header__nav--open a {
    font-size: 16px;
    color: var(--av-text-primary);
    padding: 14px 0;
    border-bottom: 1px solid var(--av-border-light);
}

.av-header__nav--open a:hover {
    color: var(--av-accent);
    background: transparent;
}

/* ---------- BUTTONS ---------- */
.av-btn {
    display: inline-block;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 14px 32px;
    border-radius: var(--av-radius);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

.av-btn--primary {
    background: var(--av-accent);
    color: #fff;
}

.av-btn--primary:hover {
    background: var(--av-accent-hover);
}

.av-btn--outline {
    background: transparent;
    color: var(--av-text-primary);
    border: 1px solid var(--av-border);
}

.av-btn--outline:hover {
    border-color: var(--av-accent);
    color: var(--av-accent);
}

.av-btn--full { display: block; width: 100%; }

/* ---------- PAGE HERO (inner pages) ---------- */
.av-page-hero {
    padding: 100px 0 60px;
    background: #ffffff;
    border-bottom: 1px solid var(--av-border-light);
}

.av-page-hero .av-container {
    position: relative;
    z-index: 1;
}

.av-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}

.av-breadcrumb a {
    color: var(--av-text-secondary);
    transition: color 0.2s;
}

.av-breadcrumb a:hover {
    color: var(--av-accent);
}

.av-breadcrumb .av-breadcrumb__sep {
    color: #bbb;
}

.av-page-hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    color: var(--av-text-primary);
    margin-bottom: 16px;
}

.av-page-hero__text {
    font-size: 16px;
    color: var(--av-text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

/* ---------- SECTION (generic content block) ---------- */
.av-section {
    padding: 80px 0;
    background: var(--av-bg-primary);
}

.av-section--alt {
    background: var(--av-bg-secondary);
}

.av-section--border {
    border-top: 1px solid var(--av-border-light);
}

.av-section-header {
    text-align: center;
    margin-bottom: 56px;
}

.av-section-overline {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--av-accent);
    margin-bottom: 12px;
}

.av-section-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--av-text-primary);
    margin-bottom: 16px;
}

.av-section-subtitle {
    font-size: 16px;
    color: var(--av-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- CONTENT GRID (2-col) ---------- */
.av-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

/* ---------- INFO CARD ---------- */
.av-info-card {
    background: var(--av-bg-card);
    border: 1px solid var(--av-border-light);
    border-radius: var(--av-radius);
    padding: 28px;
}

.av-info-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--av-radius);
    background: var(--av-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--av-accent);
    margin-bottom: 16px;
}

.av-info-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--av-text-primary);
    margin-bottom: 8px;
}

.av-info-card__text {
    font-size: 14px;
    color: var(--av-text-secondary);
    line-height: 1.7;
}

/* ---------- FEATURES GRID ---------- */
.av-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.av-feature-card {
    background: var(--av-bg-card);
    border: 1px solid var(--av-border-light);
    border-radius: var(--av-radius);
    padding: 32px 24px;
    transition: border-color 0.2s;
}

.av-feature-card:hover {
    border-color: var(--av-accent);
}

.av-feature-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--av-radius);
    background: var(--av-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--av-accent);
    margin-bottom: 20px;
}

.av-feature-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--av-text-primary);
    margin-bottom: 10px;
}

.av-feature-card__text {
    font-size: 14px;
    color: var(--av-text-secondary);
    line-height: 1.7;
}

/* ---------- STATS GRID ---------- */
.av-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.av-stat-card {
    background: var(--av-bg-card);
    border: 1px solid var(--av-border-light);
    border-radius: var(--av-radius);
    padding: 28px 20px;
    text-align: center;
}

.av-stat-card__number {
    font-family: 'PT Sans', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--av-accent);
    display: block;
    margin-bottom: 6px;
}

.av-stat-card__label {
    font-size: 13px;
    color: var(--av-text-secondary);
}

/* ---------- CATEGORY CARDS ---------- */
.av-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.av-category-card {
    background: var(--av-bg-card);
    border: 1px solid var(--av-border-light);
    border-radius: var(--av-radius);
    padding: 28px 24px;
    transition: border-color 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.av-category-card:hover {
    border-color: var(--av-accent);
}

.av-category-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--av-radius);
    background: var(--av-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--av-accent);
    flex-shrink: 0;
}

.av-category-card__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--av-text-primary);
    margin-bottom: 6px;
}

.av-category-card__text {
    font-size: 13px;
    color: var(--av-text-secondary);
    line-height: 1.6;
}

/* ---------- BRAND CARDS ---------- */
.av-brand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.av-brand-card {
    background: var(--av-bg-card);
    border: 1px solid var(--av-border-light);
    border-radius: var(--av-radius);
    padding: 24px 16px;
    text-align: center;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.av-brand-card:hover {
    border-color: var(--av-accent);
}

.av-brand-card__name {
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--av-text-secondary);
}

/* ---------- CONTACT FORM ---------- */
.av-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.av-contact-text {
    font-size: 16px;
    color: var(--av-text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
    margin-top: 12px;
}

.av-contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.av-contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.av-contact-detail svg {
    flex-shrink: 0;
    color: var(--av-accent);
    margin-top: 2px;
}

.av-contact-detail a {
    color: var(--av-text-secondary);
    transition: color 0.2s;
}

.av-contact-detail a:hover {
    color: var(--av-accent);
}

.av-contact-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 2px;
}

.av-contact-detail p,
.av-contact-detail a {
    font-size: 15px;
}

.av-contact-form {
    background: var(--av-bg-secondary);
    border: 1px solid var(--av-border-light);
    border-radius: var(--av-radius);
    padding: 40px 36px;
}

.av-contact-form__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--av-text-primary);
    margin-bottom: 28px;
}

.av-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.av-form-group {
    margin-bottom: 16px;
}

.av-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--av-text-secondary);
    margin-bottom: 8px;
}

.av-form-input,
.av-form-textarea,
.av-form-select {
    width: 100%;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: var(--av-text-primary);
    background: #ffffff;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius);
    padding: 13px 16px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.av-form-input::placeholder,
.av-form-textarea::placeholder {
    color: #aaa;
}

.av-form-input:focus,
.av-form-textarea:focus,
.av-form-select:focus {
    border-color: var(--av-accent);
}

.av-form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%234a5568' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.av-form-select option {
    background: #ffffff;
    color: var(--av-text-primary);
}

.av-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.av-form-note {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 16px;
}

/* ---------- FAQ ACCORDION ---------- */
.av-faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.av-faq-item {
    background: var(--av-bg-card);
    border: 1px solid var(--av-border-light);
    border-radius: var(--av-radius);
    overflow: hidden;
}

.av-faq-item--open {
    border-color: var(--av-accent);
}

.av-faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--av-text-primary);
    user-select: none;
}

.av-faq-question:hover {
    color: var(--av-accent);
}

.av-faq-question svg {
    flex-shrink: 0;
    color: var(--av-text-secondary);
}

.av-faq-item--open .av-faq-question svg {
    transform: rotate(180deg);
    color: var(--av-accent);
}

.av-faq-answer {
    max-height: 0;
    overflow: hidden;
}

.av-faq-answer-inner {
    padding: 0 24px 20px;
    font-size: 14px;
    color: var(--av-text-secondary);
    line-height: 1.8;
}

/* ---------- WORKFLOW STEPS ---------- */
.av-workflow-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
}

.av-workflow-steps::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--av-border-light);
}

.av-step-card {
    text-align: center;
    position: relative;
    z-index: 1;
}

.av-step-card__number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--av-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-family: 'PT Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--av-accent);
}

.av-step-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--av-text-primary);
    margin-bottom: 6px;
}

.av-step-card__text {
    font-size: 13px;
    color: var(--av-text-secondary);
    line-height: 1.5;
}

/* ---------- TECH TABLE ---------- */
.av-tech-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--av-bg-card);
    border: 1px solid var(--av-border-light);
    border-radius: var(--av-radius);
    overflow: hidden;
}

.av-tech-table thead {
    background: var(--av-bg-secondary);
}

.av-tech-table th {
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--av-text-secondary);
    text-align: left;
    border-bottom: 1px solid var(--av-border);
}

.av-tech-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--av-text-primary);
    border-bottom: 1px solid var(--av-border-light);
}

.av-tech-table tbody tr:nth-child(even) {
    background: var(--av-bg-secondary);
}

.av-tech-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- CTA SECTION ---------- */
.av-cta-section {
    padding: 80px 0;
    text-align: center;
    background: var(--av-accent);
}

.av-cta-section h2 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.av-cta-section p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.av-cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.av-cta-section .av-btn--outline {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.av-cta-section .av-btn--outline:hover {
    border-color: #ffffff;
    color: #ffffff;
}

/* ---------- MAP PLACEHOLDER ---------- */
.av-map-placeholder {
    background: var(--av-bg-secondary);
    border: 1px solid var(--av-border-light);
    border-radius: var(--av-radius);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}

.av-map-placeholder__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--av-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--av-accent);
}

.av-map-placeholder__text {
    color: var(--av-text-secondary);
    font-size: 15px;
}

.av-map-placeholder__note {
    color: #999;
    font-size: 13px;
}

/* ---------- FOOTER ---------- */
.av-footer {
    padding: 48px 0 0;
    border-top: 1px solid var(--av-border);
}

.av-footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 36px;
}

.av-footer h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--av-text-primary);
}

.av-footer a,
.av-footer p {
    display: block;
    font-size: 14px;
    color: var(--av-text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.av-footer a:hover { color: var(--av-accent); }

.av-footer__bottom {
    border-top: 1px solid var(--av-border);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--av-text-secondary);
}

/* ---------- RESPONSIVE: TABLET ---------- */
@media (max-width: 1024px) {
    .av-header__nav a { padding: 8px 10px; font-size: 13px; }
    .av-footer__grid { grid-template-columns: 1fr 1fr; }

    .av-content-grid { grid-template-columns: 1fr; gap: 40px; }

    .av-features-grid { grid-template-columns: repeat(2, 1fr); }
    .av-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

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

    .av-contact-grid { grid-template-columns: 1fr; gap: 48px; }

    .av-workflow-steps { grid-template-columns: repeat(3, 1fr); }
    .av-workflow-steps::before { display: none; }
}

/* ---------- RESPONSIVE: MOBILE ---------- */
@media (max-width: 768px) {
    .av-header__inner { height: 56px; }
    .av-header__nav { display: none; }
    .av-header__phone-btn { display: none; }
    .av-header__burger { display: flex; }
    .av-header__nav--open { display: flex; }

    .av-page-hero { padding: 80px 0 48px; }

    .av-features-grid { grid-template-columns: 1fr; }
    .av-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .av-brand-grid { grid-template-columns: repeat(2, 1fr); }
    .av-category-grid { grid-template-columns: 1fr; }
    .av-footer__grid { grid-template-columns: 1fr; gap: 28px; }

    .av-workflow-steps { grid-template-columns: 1fr; gap: 24px; }

    .av-form-row { grid-template-columns: 1fr; }
    .av-contact-form { padding: 28px 20px; }

    .av-section { padding: 56px 0; }
    .av-cta-section { padding: 56px 0; }
}

/* ---------- RESPONSIVE: SMALL MOBILE ---------- */
@media (max-width: 480px) {
    .av-container { padding: 0 16px; }
    .av-header__inner { padding: 0 16px; }
    .av-page-hero { padding: 72px 0 40px; }
    .av-btn { padding: 12px 24px; font-size: 13px; }
    .av-brand-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- HIDE FLATSOME LEAK ON INNER PAGES ---------- */
body.avelec-page .mobile-sidebar,
body.avelec-page .mfp-hide,
body.avelec-page .flatsome-social-share,
body.avelec-page .share-bar,
body.avelec-page .back-to-top,
body.avelec-page footer.flatsome-footer,
body.avelec-page .absolute-footer,
body.avelec-page .footer-secondary {
    display: none !important;
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
