/*
Theme Name: EliteJapan
Author: EliteJapan
Description: Светлая тема в красных тонах для сайта контрактных автозапчастей EliteJapan.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elitejapan
Tags: custom-menu, custom-logo, featured-images
*/

:root {
    --ej-red: #d32f2f;
    --ej-red-dark: #a31515;
    --ej-red-bright: #ef5350;
    --ej-red-soft: #fdecec;
    --ej-ink: #23252f;
    --ej-body: #3f4250;
    --ej-muted: #6b6f7d;
    --ej-line: #e9e6e6;
    --ej-bg: #ffffff;
    --ej-bg-soft: #faf8f8;
    --ej-radius: 14px;
    --ej-shadow: 0 12px 32px rgba(35, 37, 47, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ej-body);
    background: var(--ej-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    color: var(--ej-ink);
    line-height: 1.25;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--ej-red);
}

a:hover {
    color: var(--ej-red-dark);
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

.skip-link:focus {
    clip: auto;
    clip-path: none;
    height: auto;
    width: auto;
    position: fixed;
    top: 8px;
    left: 8px;
    background: #fff;
    color: var(--ej-red);
    padding: 10px 18px;
    border-radius: 8px;
    z-index: 100000;
    box-shadow: var(--ej-shadow);
}

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: none;
}

.btn-primary {
    background: var(--ej-red);
    color: #fff;
    box-shadow: 0 10px 24px rgba(211, 47, 47, 0.35);
}

.btn-primary:hover {
    background: var(--ej-red-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(211, 47, 47, 0.42);
}

.btn-outline {
    border-color: var(--ej-red);
    color: var(--ej-red);
    background: #fff;
}

.btn-outline:hover {
    background: var(--ej-red);
    color: #fff;
    transform: translateY(-2px);
}

.btn-white {
    background: #fff;
    color: var(--ej-red);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.btn-white:hover {
    background: var(--ej-red-soft);
    color: var(--ej-red-dark);
    transform: translateY(-2px);
}

/* ---------- Шапка ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--ej-line);
}

.header-top {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 14px 0;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, var(--ej-red-bright), var(--ej-red-dark) 70%);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.4);
    flex: none;
}

.site-title-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--ej-ink);
    white-space: nowrap;
}

.site-title-text em {
    color: var(--ej-red);
    font-style: normal;
}

.custom-logo {
    max-height: 56px;
    width: auto;
}

.main-nav {
    margin-left: auto;
}

.main-nav ul.menu {
    display: flex;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--ej-body);
    font-weight: 600;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--ej-red);
    border-bottom-color: var(--ej-red);
}

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ej-red);
    text-decoration: none;
    white-space: nowrap;
}

.header-phone svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.header-phone:hover {
    color: var(--ej-red-dark);
}

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    border: 1px solid var(--ej-line);
    border-radius: 10px;
    padding: 9px;
}

.nav-toggle-label span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ej-ink);
    border-radius: 2px;
}

/* ---------- Герой ---------- */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 48px;
    align-items: center;
    padding: 76px 0 88px;
}

.hero-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ej-red);
}

.hero-title {
    font-size: clamp(1.9rem, 4vw, 3.15rem);
    font-weight: 800;
    margin: 16px 0 18px;
}

.hero-title .accent {
    color: var(--ej-red);
}

.hero-sub {
    font-size: 1.12rem;
    color: var(--ej-muted);
    max-width: 56ch;
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hero-features {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.hero-features li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ej-body);
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-features svg {
    width: 18px;
    height: 18px;
    fill: var(--ej-red);
    flex: none;
}

.hero-visual {
    position: relative;
    min-height: 360px;
}

.hero-visual .disc {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, var(--ej-red-bright), var(--ej-red-dark) 72%);
    box-shadow: 0 34px 80px rgba(211, 47, 47, 0.38);
}

.hero-visual .ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 2px dashed rgba(211, 47, 47, 0.35);
}

.chip {
    position: absolute;
    background: #fff;
    border: 1px solid var(--ej-line);
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ej-ink);
    box-shadow: 0 10px 26px rgba(35, 37, 47, 0.12);
    white-space: nowrap;
}

.chip::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ej-red);
    margin-right: 9px;
    vertical-align: 1px;
}

.chip-1 { top: 6%; left: 0; }
.chip-2 { top: 32%; right: -6%; }
.chip-3 { bottom: 20%; left: -4%; }
.chip-4 { bottom: 2%; right: 8%; }

/* ---------- Секции ---------- */

.section {
    padding: 76px 0;
}

.section-soft {
    background: var(--ej-bg-soft);
}

.section-head {
    text-align: center;
    max-width: 740px;
    margin: 0 auto 46px;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin: 0 0 14px;
}

.section-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 2px;
    background: var(--ej-red);
    margin: 16px auto 0;
}

.section-lead {
    color: var(--ej-muted);
    margin: 0;
    font-size: 1.05rem;
}

/* ---------- Карточки услуг ---------- */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ej-line);
    border-radius: var(--ej-radius);
    padding: 30px 28px;
    box-shadow: 0 4px 16px rgba(35, 37, 47, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ej-red-bright), var(--ej-red-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ej-shadow);
    border-color: #f2c7c7;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--ej-red-soft);
    color: var(--ej-red);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.card h3 {
    font-size: 1.15rem;
    margin: 0 0 10px;
}

.card p {
    color: var(--ej-muted);
    margin: 0;
}

/* ---------- О компании ---------- */

.about-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 40px;
    align-items: start;
}

.about-text p {
    font-size: 1.03rem;
}

.about-text p:first-child strong {
    color: var(--ej-ink);
}

.advantages {
    background: #fff;
    border: 1px solid var(--ej-line);
    border-radius: var(--ej-radius);
    padding: 28px;
    box-shadow: 0 4px 16px rgba(35, 37, 47, 0.05);
}

.advantages h3 {
    margin: 0 0 18px;
    font-size: 1.1rem;
}

.advantages ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.advantages li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--ej-line);
    font-weight: 600;
    color: var(--ej-body);
}

.advantages li:last-child {
    border-bottom: 0;
}

.advantages svg {
    width: 20px;
    height: 20px;
    fill: var(--ej-red);
    flex: none;
    margin-top: 2px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.stat {
    background: #fff;
    border: 1px solid var(--ej-line);
    border-radius: var(--ej-radius);
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(35, 37, 47, 0.05);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ej-red);
    line-height: 1.1;
}

.stat-label {
    color: var(--ej-muted);
    font-size: 0.92rem;
    margin-top: 8px;
}

/* ---------- Контакты ---------- */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.contact-card {
    background: #fff;
    border: 1px solid var(--ej-line);
    border-radius: var(--ej-radius);
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(35, 37, 47, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ej-shadow);
}

.contact-card .icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--ej-red-soft);
    color: var(--ej-red);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-card .icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.contact-card .label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ej-muted);
    margin-top: 6px;
}

.contact-card .value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ej-ink);
    text-decoration: none;
    word-break: break-word;
}

a.contact-card .value,
.contact-card a.value {
    color: var(--ej-red);
}

.contact-card a.value:hover {
    color: var(--ej-red-dark);
}

.cta-banner {
    margin-top: 48px;
    background: linear-gradient(120deg, var(--ej-red-dark), var(--ej-red-bright));
    border-radius: 20px;
    padding: 42px 46px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
    box-shadow: 0 18px 44px rgba(183, 28, 28, 0.35);
}

.cta-banner h3 {
    color: #fff;
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
    margin: 0;
}

.cta-banner p {
    margin: 8px 0 0;
    opacity: 0.92;
}

/* ---------- Контент страниц ---------- */

.page-content {
    padding: 64px 0 76px;
}

.narrow {
    max-width: 860px;
    margin: 0 auto;
}

.page-title {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 800;
    margin: 0 0 26px;
    padding-bottom: 16px;
    position: relative;
}

.page-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 4px;
    border-radius: 2px;
    background: var(--ej-red);
}

.entry-content h3 {
    margin-top: 1.7em;
}

.entry-content p {
    font-size: 1.03rem;
}

.entry-content a {
    font-weight: 600;
}

.post-card {
    padding: 26px 0;
    border-bottom: 1px solid var(--ej-line);
}

.post-card .page-title {
    margin-bottom: 10px;
    padding-bottom: 0;
}

.post-card .page-title::after {
    display: none;
}

.post-card .page-title a {
    color: var(--ej-ink);
    text-decoration: none;
}

.post-card .page-title a:hover {
    color: var(--ej-red);
}

.post-meta {
    color: var(--ej-muted);
    font-size: 0.9rem;
    margin: 0 0 10px;
}

.pagination {
    margin-top: 32px;
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--ej-line);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    color: var(--ej-body);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--ej-red);
    border-color: var(--ej-red);
    color: #fff;
}

.error-404 {
    text-align: center;
}

.error-404 .code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--ej-red);
    line-height: 1;
    margin: 0 0 10px;
}

/* ---------- Подвал ---------- */

.site-footer {
    background: var(--ej-ink);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding: 56px 0 44px;
    color: #c9cbd4;
}

.footer-logo {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
}

.footer-logo em {
    color: var(--ej-red-bright);
    font-style: normal;
}

.footer-tagline {
    margin: 12px 0 0;
    max-width: 34ch;
    color: #9a9daa;
    font-size: 0.95rem;
}

.site-footer h3 {
    color: #fff;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 4px 0 16px;
}

.site-footer p {
    margin: 0 0 10px;
}

.site-footer a {
    color: #f28b8b;
    text-decoration: none;
}

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

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

.footer-menu li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
    margin: 0;
    padding: 18px 0;
    color: #8f92a0;
    font-size: 0.9rem;
}

/* ---------- Адаптивность ---------- */

@media (max-width: 1024px) {
    .hero-visual .ring {
        width: 340px;
        height: 340px;
    }
    .hero-visual .disc {
        width: 270px;
        height: 270px;
    }
}

@media (max-width: 900px) {
    .header-top {
        flex-wrap: wrap;
        gap: 14px;
    }
    .nav-toggle-label {
        display: flex;
        order: 3;
        margin-left: auto;
    }
    .header-phone {
        order: 2;
        margin-left: auto;
        font-size: 1rem;
    }
    .nav-toggle-label + .header-phone,
    .header-phone + .nav-toggle-label {
        margin-left: 0;
    }
    .header-phone + .nav-toggle-label {
        margin-left: 16px;
    }
    .main-nav {
        display: none;
        order: 4;
        flex-basis: 100%;
        margin: 6px -20px 0;
        padding: 0 20px 14px;
    }
    .nav-toggle:checked ~ .main-nav {
        display: block;
    }
    .main-nav ul.menu {
        flex-direction: column;
        gap: 0;
    }
    .main-nav a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--ej-line);
    }
    .main-nav li:last-child a {
        border-bottom: 0;
    }
    .hero-inner {
        grid-template-columns: 1fr;
        padding: 56px 0 64px;
    }
    .hero-visual {
        min-height: 300px;
        margin-top: 12px;
    }
    .hero-visual .ring {
        width: 300px;
        height: 300px;
    }
    .hero-visual .disc {
        width: 240px;
        height: 240px;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .cta-banner {
        padding: 34px 30px;
    }
}

@media (max-width: 560px) {
    .stats {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .cta-banner .btn {
        width: 100%;
        justify-content: center;
    }
}
