/*
Theme Name: dds_easysolutionweb.com
Author: Илья Корнее
Description: Контентный сайт о иностранных языках для путешествий: практические фразы, мини-уроки по типичным ситуациям, разговорники, советы по быстрой подготовке к поездке и подборки полезных приложений.
Version: 1.1
Text Domain: dds_easysolutionweb
*/

/* ============ Базовый сброс ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Spectral', Georgia, 'Times New Roman', serif;
    color: #2A2826;
    background: #F9F8F6;
    line-height: 1.65;
    font-size: 17px;
}
img { max-width: 100%; height: auto; }
a { color: #4A7B7D; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #2A2826;
    line-height: 1.25;
    margin: 1.4em 0 0.6em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }
p code, code, kbd, pre, .phrase-foreign {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: #F0EFEA;
    padding: 0.05em 0.35em;
    border-radius: 4px;
    font-size: 0.95em;
}
pre { padding: 1em; overflow-x: auto; }

blockquote {
    border-left: 4px solid #C45C4A;
    margin: 1.5em 0;
    padding: 0.6em 1.2em;
    background: #F0EFEA;
    border-radius: 0 8px 8px 0;
    color: #2A2826;
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid #E2DFD7;
}
th, td {
    border: 1px solid #E2DFD7;
    padding: 0.6em 0.9em;
    text-align: left;
}
th { background: #F0EFEA; font-family: 'Inter', sans-serif; font-weight: 600; }

/* ============ Контейнер ============ */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ Шапка ============ */
.site-header {
    background: #F9F8F6;
    border-bottom: 1px solid #E2DFD7;
    padding: 18px 0;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #2A2826;
    flex: 1 1 auto;
    min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand-logo, .brand-svg {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: block;
}
.brand-svg { color: #C45C4A; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: #2A2826;
    margin: 0 0 2px;
    line-height: 1.25;
}
.brand-tagline {
    font-size: 0.82rem;
    color: #6b665f;
    margin: 0;
    line-height: 1.35;
    max-width: 560px;
}

/* Главное меню в шапке */
.main-nav {
    flex: 0 0 auto;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.main-nav a {
    display: inline-block;
    padding: 9px 14px;
    color: #2A2826;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: background 0.18s ease, color 0.18s ease;
}
.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current_page_item a {
    background: rgba(196, 92, 74, 0.1);
    color: #C45C4A;
    text-decoration: none;
}

/* Бургер */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid #E2DFD7;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #2A2826;
}

@media (max-width: 960px) {
    .site-header .wrap { gap: 16px; }
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex: 1 1 100%;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .main-nav a { display: block; }
}

/* ============ Hero / страница ============ */
.page-title {
    margin: 28px 0 8px;
    font-size: 2rem;
}
.page-subtitle {
    color: #6b665f;
    margin: 0 0 24px;
}

/* ============ Хлебные крошки ============ */
.breadcrumbs {
    font-size: 0.88rem;
    color: #6b665f;
    margin: 18px 0 6px;
    font-family: 'Inter', sans-serif;
}
.breadcrumbs a { color: #4A7B7D; }
.breadcrumbs .sep { margin: 0 6px; color: #b8b3aa; }

/* ============ Layout с сайдбаром ============ */
.layout {
    display: flex;
    gap: 40px;
    margin: 24px 0 56px;
    align-items: flex-start;
}
.layout .content { flex: 1 1 auto; min-width: 0; }
.layout.has-sidebar .content { flex: 0 0 67%; max-width: 67%; }
.layout.has-sidebar .sidebar { flex: 0 0 27%; max-width: 27%; }
.layout.no-sidebar .content { flex: 0 0 85%; max-width: 85%; margin: 0 auto; }

@media (max-width: 960px) {
    .layout, .layout.has-sidebar, .layout.no-sidebar { flex-direction: column; }
    .layout .content,
    .layout.has-sidebar .content,
    .layout.no-sidebar .content,
    .layout.has-sidebar .sidebar { flex: 1 1 100%; max-width: 100%; }
}

/* ============ Карточки записей ============ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 28px 0;
}
.card {
    display: flex;
    flex-direction: column;
    background: #F0EFEA;
    border: 1px solid #E2DFD7;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(42, 40, 38, 0.08);
}
.card-thumb-wrap {
    overflow: hidden;
    background: #E2DFD7;
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }
.card-body {
    flex: 1;
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
}
.card-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: #6b665f;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.card-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    margin: 0 0 10px;
    line-height: 1.3;
}
.card-title a { color: #2A2826; }
.card-title a:hover { color: #C45C4A; text-decoration: none; }
.card-excerpt {
    color: #2A2826;
    font-size: 0.96rem;
    margin: 0 0 14px;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-more {
    align-self: flex-start;
    margin-top: auto;
}

/* ============ Кнопки ============ */
.btn,
button.btn,
input[type="submit"],
.wp-block-button__link {
    display: inline-block;
    min-height: 44px;
    padding: 11px 22px;
    background: #C45C4A;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
    line-height: 1.2;
    text-align: center;
}
.btn:hover,
button.btn:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
    background: #A84A38;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(168, 74, 56, 0.22);
    transform: translateY(1px);
}
.btn-secondary {
    background: transparent;
    color: #4A7B7D;
    border: 1.5px solid #4A7B7D;
}
.btn-secondary:hover {
    background: rgba(74, 123, 125, 0.1);
    color: #4A7B7D;
    box-shadow: none;
}
.btn-download {
    background: #8B9A6E;
}
.btn-download:hover { background: #748257; box-shadow: 0 4px 10px rgba(116, 130, 87, 0.25); }
.btn-download::before {
    content: "↓";
    margin-right: 8px;
    font-weight: 700;
}

/* ============ Главная — секции ============ */
.front-section {
    padding: 36px 0 12px;
    border-bottom: 1px solid #E2DFD7;
}
.front-section:last-of-type { border-bottom: none; }
.front-section-eyebrow {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: #C45C4A;
    margin: 0 0 6px;
}
.front-section-title {
    margin: 0 0 8px;
    font-size: 1.85rem;
}
.front-section-lead {
    color: #4a4642;
    max-width: 720px;
    margin: 0 0 24px;
    font-size: 1.05rem;
}

/* Категории-иконки */
.category-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin: 12px 0 28px;
}
.cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: #F0EFEA;
    border: 1px solid #E2DFD7;
    border-radius: 10px;
    text-align: center;
    color: #2A2826;
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.cat-tile:hover {
    transform: translateY(-3px);
    border-color: #C45C4A;
    text-decoration: none;
}
.cat-tile svg {
    width: 44px;
    height: 44px;
    color: #C45C4A;
}
.cat-tile-name {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.98rem;
}

/* Шаги быстрой подготовки */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 14px 0 28px;
}
.step {
    background: #F0EFEA;
    border: 1px solid #E2DFD7;
    border-radius: 10px;
    padding: 22px 22px 24px;
    position: relative;
}
.step-num {
    font-family: 'Inter', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #C45C4A;
    line-height: 1;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}
.step-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    margin: 0 0 6px;
}
.step p { margin: 0; font-size: 0.95rem; color: #4a4642; }

/* Карточки приложений в виде "билетов" */
.app-tickets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 14px 0 28px;
}
.ticket {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #E2DFD7;
    border-radius: 10px;
    border-bottom: 1px dashed #C45C4A;
    color: #2A2826;
    transition: transform 0.18s ease;
}
.ticket:hover { transform: translateY(-2px); text-decoration: none; }
.ticket-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    background: #F0EFEA;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4A7B7D;
}
.ticket-icon svg { width: 24px; height: 24px; }
.ticket-body { flex: 1; min-width: 0; }
.ticket-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 3px;
}
.ticket-desc { font-size: 0.88rem; color: #6b665f; margin: 0; }
.ticket-rating {
    flex: 0 0 auto;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #8B9A6E;
}

/* Виджет «5 фраз для этого часа» */
.phrase-widget {
    background: #F0EFEA;
    border: 1px solid #E2DFD7;
    border-radius: 12px;
    padding: 26px;
    margin: 14px 0 28px;
}
.phrase-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}
.phrase-tab {
    background: transparent;
    border: 1px solid #E2DFD7;
    border-radius: 8px;
    padding: 8px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    color: #4a4642;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.phrase-tab.is-active,
.phrase-tab:hover {
    background: #C45C4A;
    color: #fff;
    border-color: #C45C4A;
}
.phrase-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}
.phrase-card {
    background: #fff;
    border: 1px solid #E2DFD7;
    border-radius: 8px;
    padding: 14px 16px;
    perspective: 800px;
    cursor: pointer;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.4s ease, box-shadow 0.18s ease;
    transform-style: preserve-3d;
}
.phrase-card:hover {
    box-shadow: 0 4px 14px rgba(42, 40, 38, 0.06);
}
.phrase-card.is-flipped { transform: rotateY(180deg); }
.phrase-foreign {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.02rem;
    background: #F0EFEA;
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
    margin: 0 0 8px;
}
.phrase-translation {
    font-size: 0.95rem;
    margin: 0;
}
.phrase-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Тост уведомление */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #8B9A6E;
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 9999;
}
.toast.is-visible { opacity: 1; }

/* ============ Сайдбар ============ */
.sidebar { font-size: 0.96rem; }
.widget {
    background: #F0EFEA;
    border: 1px solid #E2DFD7;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 22px;
}
.widget-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
    color: #C45C4A;
}
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget li {
    padding: 6px 0;
    border-bottom: 1px solid #E2DFD7;
}
.widget li:last-child { border-bottom: none; }
.widget li a { color: #2A2826; }
.widget li a:hover { color: #C45C4A; text-decoration: none; }

/* ============ Поиск ============ */
.search-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    max-width: 480px;
    margin: 18px 0;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E2DFD7;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.96rem;
    color: #2A2826;
    min-height: 44px;
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: #4A7B7D;
}
.search-form button {
    padding: 0 20px;
}

/* ============ Пагинация ============ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 32px 0 16px;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #E2DFD7;
    border-radius: 8px;
    background: #F0EFEA;
    color: #2A2826;
    font-family: 'Inter', sans-serif;
    font-size: 0.94rem;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.pagination .page-numbers:hover {
    background: rgba(196, 92, 74, 0.1);
    border-color: #C45C4A;
    text-decoration: none;
}
.pagination .page-numbers.current {
    background: #C45C4A;
    border-color: #C45C4A;
    color: #fff;
}
.pagination .dots { background: transparent; border: none; }

/* ============ Запись (single) ============ */
.entry-header { margin: 16px 0 22px; }
.entry-title { margin: 0 0 8px; font-size: 2.05rem; }
.entry-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    color: #6b665f;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.entry-meta a { color: #4A7B7D; }
.entry-thumb { margin: 0 0 24px; border-radius: 10px; overflow: hidden; }
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.02rem; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content img { display: block; max-width: 100%; height: auto; border-radius: 8px; margin: 1em 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1em; }

/* ============ Комментарии ============ */
.comments-area { margin-top: 48px; }
.comments-title { font-size: 1.4rem; margin: 0 0 18px; }
.commentlist { list-style: none; padding: 0; margin: 0; }
.commentlist li {
    padding: 16px 18px;
    margin: 0 0 14px;
    background: #F0EFEA;
    border: 1px solid #E2DFD7;
    border-radius: 10px;
}
.commentlist .children { list-style: none; padding-left: 22px; margin-top: 12px; }
.comment-author {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin: 0 0 4px;
}
.comment-meta {
    font-size: 0.82rem;
    color: #6b665f;
    margin: 0 0 8px;
}
.comment-respond { margin-top: 24px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E2DFD7;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.96rem;
    color: #2A2826;
    margin-top: 4px;
}
.comment-form textarea { min-height: 130px; }
.comment-form p { margin: 0 0 12px; }

/* ============ Подвал ============ */
.site-footer {
    background: #2A2826;
    color: #d6d2cb;
    margin-top: 56px;
    padding: 44px 0 20px;
}
.site-footer a { color: #e9d6cf; }
.site-footer a:hover { color: #fff; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 0 0 28px;
}
@media (max-width: 960px) {
    .footer-cols { grid-template-columns: 1fr; gap: 24px; }
}
.site-footer .widget {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: #d6d2cb;
}
.site-footer .widget-title { color: #e9d6cf; }
.site-footer .widget li {
    border-bottom: 1px solid #3d3a36;
}
.site-footer .widget li a { color: #d6d2cb; }
.site-footer .widget li a:hover { color: #fff; }
.site-copyright {
    border-top: 1px solid #3d3a36;
    padding-top: 18px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    color: #a8a39a;
}

/* ============ Cookie-баннер ============ */
/* Высокоприоритетное правило для скрытия — должно идти ДО основного блока стилей (см. A11) */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: #2A2826;
    color: #f4f1ec;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 9998;
    flex-wrap: wrap;
}
.cookie-banner p {
    flex: 1 1 280px;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
}
.cookie-banner .btn { flex: 0 0 auto; }

/* ============ 404 ============ */
.notfound {
    text-align: center;
    padding: 60px 0;
}
.notfound .big {
    font-family: 'Inter', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: #C45C4A;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.03em;
}
.notfound h1 { margin: 8px 0 12px; }
.notfound p { color: #6b665f; max-width: 520px; margin: 0 auto 22px; }
.notfound .search-form { margin: 0 auto 22px; }

/* ============ Мобильное ============ */
@media (max-width: 600px) {
    body { font-size: 16px; }
    h1, .entry-title, .page-title { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }
    .wrap { padding: 0 16px; }
    .site-header { padding: 14px 0; }
    .brand-tagline { display: none; }
    .front-section { padding: 28px 0 8px; }
    .layout { gap: 24px; margin: 16px 0 32px; }
    .posts-grid { grid-template-columns: 1fr; gap: 18px; }
    .cookie-banner { padding: 14px; flex-direction: column; align-items: stretch; }
}
