/*
Theme Name: 8 Winds Travel
Theme URI: https://example.com/8-winds-travel
Author: ChatGPT
Author URI: https://openai.com/
Description: Легкая тема для турагентства, совместимая с плагином 8 Winds Tours. Каталог туров, страницы туров, форма заявки и документы оформляются в едином стиле.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eight-winds-travel
*/

:root {
    --ew8-bg: #f8f4ed;
    --ew8-surface: #ffffff;
    --ew8-surface-soft: #fffaf2;
    --ew8-text: #1f2933;
    --ew8-muted: #667085;
    --ew8-line: rgba(31, 41, 51, .12);
    --ew8-accent: #bf5b2c;
    --ew8-accent-dark: #8f3f1f;
    --ew8-green: #245f4f;
    --ew8-radius-lg: 26px;
    --ew8-radius-md: 18px;
    --ew8-shadow: 0 18px 50px rgba(38, 30, 20, .10);
    --ew8-container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ew8-text);
    background: var(--ew8-bg);
    line-height: 1.65;
    font-size: 17px;
}

a {
    color: var(--ew8-accent-dark);
}

a:hover {
    color: var(--ew8-accent);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.ew8-container {
    width: min(var(--ew8-container), calc(100% - 40px));
    margin: 0 auto;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 244, 237, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ew8-line);
}

body.admin-bar .site-header {
    top: 32px;
}

.site-header-inner {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.site-branding.has-logo {
    min-width: 320px;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
    max-width: 320px;
}

.custom-logo-link img {
    max-height: 92px;
    width: auto;
    display: block;
    object-fit: contain;
}

.site-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.02em;
}

.site-title a {
    text-decoration: none;
    color: var(--ew8-text);
}

.site-description {
    margin: 2px 0 0;
    color: var(--ew8-muted);
    font-size: 13px;
}

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ew8-text);
    text-decoration: none;
    font-weight: 650;
    font-size: 15px;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    background: rgba(191, 91, 44, .12);
    color: var(--ew8-accent-dark);
}

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ew8-green);
    color: #fff !important;
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 10px 25px rgba(36, 95, 79, .18);
}

.header-cta:hover {
    background: #1d4d40;
}

.site-main {
    padding: 44px 0 70px;
}

.ew8-page-card,
.ew8-content-card {
    background: var(--ew8-surface);
    border: 1px solid var(--ew8-line);
    border-radius: var(--ew8-radius-lg);
    box-shadow: var(--ew8-shadow);
    padding: clamp(24px, 4vw, 48px);
}

.entry-header {
    margin-bottom: 24px;
}

.entry-title,
.page-title {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

.ew8-hero {
    position: relative;
    padding: clamp(44px, 7vw, 88px) 0 40px;
    overflow: hidden;
}

.ew8-hero::before {
    content: "";
    position: absolute;
    inset: 20px 0 auto auto;
    width: min(44vw, 520px);
    height: min(44vw, 520px);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(191, 91, 44, .20), rgba(191, 91, 44, 0) 65%);
    pointer-events: none;
}

.ew8-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: end;
}

.ew8-kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    color: var(--ew8-accent-dark);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 13px;
}

.ew8-kicker::before {
    content: "";
    width: 36px;
    height: 2px;
    background: currentColor;
}

.ew8-hero-title {
    margin: 0;
    font-size: clamp(42px, 7vw, 88px);
    line-height: .98;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 600;
}

.ew8-hero-text {
    margin: 22px 0 0;
    max-width: 660px;
    font-size: clamp(18px, 2vw, 22px);
    color: #4b5563;
}

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

.ew8-btn,
.ew8-btn-secondary,
.ewt-button,
.ewt-filter-form button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 20px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--ew8-accent) !important;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(191, 91, 44, .20);
}

.ew8-btn:hover,
.ewt-button:hover,
.ewt-filter-form button:hover {
    background: var(--ew8-accent-dark) !important;
    color: #fff !important;
}

.ew8-btn-secondary,
.ewt-button-secondary {
    background: #fff !important;
    color: var(--ew8-text) !important;
    box-shadow: none;
    border: 1px solid var(--ew8-line) !important;
}

.ew8-btn-secondary:hover,
.ewt-button-secondary:hover {
    background: var(--ew8-surface-soft) !important;
    color: var(--ew8-accent-dark) !important;
}

.ew8-hero-visual {
    min-height: clamp(300px, 28vw, 380px);
    border-radius: 34px;
    background:
        radial-gradient(circle at 70% 20%, rgba(255,255,255,.62), rgba(255,255,255,0) 35%),
        linear-gradient(135deg, rgba(217,148,88,.45), rgba(36,95,79,.38));
    box-shadow: var(--ew8-shadow);
    overflow: hidden;
    position: relative;
    align-self: end;
}

.ew8-hero-visual.has-image {
    background: var(--ew8-hero-image) center / cover no-repeat;
}

.ew8-hero-badge {
    position: absolute;
    left: 26px;
    top: 24px;
    max-width: calc(100% - 52px);
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.86);
    color: var(--ew8-text);
    font-weight: 800;
    font-size: 14px;
    line-height: 1.25;
}

.ew8-hero-card-title {
    position: absolute;
    right: 26px;
    bottom: 20px;
    color: rgba(255,255,255,.88);
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1;
    letter-spacing: -.06em;
    font-weight: 900;
}

.ew8-section {
    padding: 34px 0;
}

.ew8-section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.ew8-section-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.ew8-section-subtitle {
    margin: 8px 0 0;
    max-width: 640px;
    color: var(--ew8-muted);
}

.ew8-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ew8-feature {
    padding: 22px;
    background: var(--ew8-surface);
    border: 1px solid var(--ew8-line);
    border-radius: var(--ew8-radius-md);
    box-shadow: 0 12px 34px rgba(38, 30, 20, .06);
}

.ew8-feature strong {
    display: block;
    margin-bottom: 6px;
    font-size: 19px;
}

.ew8-feature p {
    margin: 0;
    color: var(--ew8-muted);
}

/* Совместимость со стилями плагина 8 Winds Tours */
.ewt-catalog {
    margin: 24px 0 0 !important;
}

.ewt-filter-form {
    background: var(--ew8-surface) !important;
    border: 1px solid var(--ew8-line) !important;
    border-radius: var(--ew8-radius-md) !important;
    padding: 18px !important;
    box-shadow: 0 12px 34px rgba(38, 30, 20, .06) !important;
}

.ewt-filter-form select,
.ewt-form-field input[type="text"],
.ewt-form-field input[type="tel"],
.ewt-form-field input[type="number"],
.ewt-form-field input[type="date"],
.ewt-form-field select,
.ewt-form-field textarea {
    min-height: 46px;
    border: 1px solid var(--ew8-line) !important;
    border-radius: 14px !important;
    background: #fff;
}

.ewt-grid {
    gap: 24px !important;
}

.ewt-card,
.ewt-request-form,
.ewt-documents,
.ewt-info-box {
    border: 1px solid var(--ew8-line) !important;
    border-radius: var(--ew8-radius-md) !important;
    box-shadow: 0 12px 34px rgba(38, 30, 20, .08) !important;
}

.ewt-card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.ewt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 46px rgba(38, 30, 20, .13) !important;
}

.ewt-card-image img {
    height: 220px !important;
}

.ewt-card h3 {
    font-size: 24px !important;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.ewt-card-price {
    color: var(--ew8-green);
}

.ewt-single-page {
    width: min(1120px, calc(100% - 40px)) !important;
}

.ewt-single-title {
    letter-spacing: -.05em;
}

.ewt-cover img {
    border-radius: 34px !important;
    box-shadow: var(--ew8-shadow);
}

.ewt-info-box {
    background: var(--ew8-surface-soft) !important;
}

.ewt-info-label {
    color: var(--ew8-muted) !important;
}

.ewt-info-value {
    color: var(--ew8-text);
}

.ewt-section {
    background: var(--ew8-surface);
    border: 1px solid var(--ew8-line);
    border-radius: var(--ew8-radius-md);
    padding: clamp(18px, 3vw, 30px);
    box-shadow: 0 12px 34px rgba(38, 30, 20, .05);
}

.ewt-section h2 {
    margin-top: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -.04em;
}

.ewt-date-list li {
    background: rgba(36, 95, 79, .10) !important;
    color: var(--ew8-green);
    font-weight: 800;
}

.ewt-price-table th {
    background: var(--ew8-surface-soft);
}

.ewt-price-table th,
.ewt-price-table td {
    border-color: var(--ew8-line) !important;
}

.ewt-request-form {
    max-width: 760px !important;
    background: var(--ew8-surface) !important;
}

.ewt-documents {
    background: var(--ew8-surface-soft) !important;
}

.site-footer {
    background: #18231f;
    color: rgba(255,255,255,.82);
    padding: 42px 0;
}

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

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.footer-brand {
    max-width: 560px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 300px;
    min-height: 92px;
    padding: 12px 16px;
    margin-bottom: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.96);
}

.footer-logo img {
    display: block;
    max-height: 78px;
    max-width: 260px;
    width: auto;
    object-fit: contain;
}

.footer-brand strong {
    display: block;
    color: #fff;
    font-size: 22px;
    margin-bottom: 8px;
}

.footer-copyright {
    margin-top: 12px;
    color: rgba(255,255,255,.58);
    font-size: 14px;
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
    text-align: right;
}

.post-list {
    display: grid;
    gap: 20px;
}

.post-list article {
    padding: 22px;
    background: var(--ew8-surface);
    border: 1px solid var(--ew8-line);
    border-radius: var(--ew8-radius-md);
}

.post-list h2 {
    margin-top: 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    body.admin-bar .site-header {
        top: 46px;
    }

    .site-header-inner {
        min-height: auto;
        padding: 14px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .site-branding.has-logo {
        min-width: 0;
    }

    .custom-logo-link {
        max-width: 280px;
    }

    .custom-logo-link img {
        max-height: 78px;
    }

    .main-navigation ul {
        flex-wrap: wrap;
    }

    .header-cta {
        width: 100%;
    }

    .ew8-hero-grid {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .ew8-hero-visual {
        min-height: 300px;
        align-self: stretch;
    }

    .ew8-features {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-menu ul {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .ew8-hero-title {
        letter-spacing: .10em;
    }

    .ew8-container,
    .ewt-single-page {
        width: min(100% - 28px, var(--ew8-container)) !important;
    }

    body {
        font-size: 16px;
    }

    .site-main {
        padding-top: 28px;
    }

    .ewt-filter-form {
        display: grid !important;
    }

    .ewt-filter-form select,
    .ewt-filter-form button,
    .ewt-reset-link {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .custom-logo-link {
        max-width: 230px;
    }

    .custom-logo-link img {
        max-height: 68px;
    }

    .footer-logo {
        max-width: 260px;
        min-height: 82px;
    }

    .footer-logo img {
        max-width: 220px;
        max-height: 66px;
    }
}
