/*
Theme Name: Бизнес Консультант — Дильмухаметов Р.В. (Apple Complete All-In-One)
Theme URI: https://example.com
Author: SHARIPOV / IT
Description: Финальная премиальная тема в стиле Apple со встроенными шаблонами юридических страниц (Оферта, Условия и Возврат, Политика конфиденциальности) и эквайрингом СБП Т-Банк.
Version: 18.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* === ПО УМОЛЧАНИЮ: СВЕТЛАЯ ТЕМА === */
:root {
    --bg-main: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --header-bg: rgba(245, 245, 247, 0.8);
    --hero-title-gradient: linear-gradient(180deg, #1d1d1f 0%, #434344 100%);
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --btn-header-bg: #1d1d1f;
    --btn-header-text: #ffffff;
    --modal-bg: rgba(255, 255, 255, 0.96);
    --modal-border: rgba(0, 0, 0, 0.1);
    --input-bg: rgba(0, 0, 0, 0.04);
    --close-btn-bg: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);
    --banner-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f2 100%);
    --photo-ring: rgba(0, 113, 227, 0.2);
    --photo-bg: #ffffff;
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* === АВТОМАТИЧЕСКАЯ ТЕМНАЯ ТЕМА === */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #000000;
        --bg-card: rgba(255, 255, 255, 0.05);
        --bg-card-hover: rgba(255, 255, 255, 0.08);
        --border: rgba(255, 255, 255, 0.12);
        --border-hover: rgba(255, 255, 255, 0.25);
        --text-primary: #f5f5f7;
        --text-secondary: #86868b;
        --header-bg: rgba(0, 0, 0, 0.8);
        --hero-title-gradient: linear-gradient(180deg, #ffffff 0%, #86868b 100%);
        --btn-header-bg: #f5f5f7;
        --btn-header-text: #000000;
        --modal-bg: rgba(28, 28, 30, 0.96);
        --modal-border: rgba(255, 255, 255, 0.15);
        --input-bg: rgba(0, 0, 0, 0.5);
        --close-btn-bg: rgba(255, 255, 255, 0.1);
        --card-shadow: none;
        --card-shadow-hover: none;
        --banner-bg: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
        --photo-ring: rgba(0, 113, 227, 0.4);
        --photo-bg: #1c1c1e;
    }
}

body {
    background-color: var(--bg-main) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-family) !important;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -.022em;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    width: 100%;
}

/* HEADER */
header {
    padding: 16px 0;
    position: sticky;
    top: 0;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.logo span {
    color: var(--text-secondary);
    font-weight: 400;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn-pay-header {
    background: var(--btn-header-bg);
    color: var(--btn-header-text);
    padding: 8px 16px;
    border-radius: 980px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: none;
    cursor: pointer;
}

.btn-pay-header:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

/* HERO SECTION */
.hero {
    padding: 90px 0 60px;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero .badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--apple-blue);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero h1 {
    font-size: 3.2rem;
    line-height: 1.07143;
    font-weight: 600;
    letter-spacing: -.005em;
    margin-bottom: 16px;
    background: var(--hero-title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-photo-wrapper {
    position: relative;
    flex-shrink: 0;
}

.hero-photo-container {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--photo-bg);
    border: 1px solid var(--border);
    box-shadow: 0 0 0 8px var(--photo-ring), var(--card-shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hero-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.hero-photo-container:hover img {
    transform: scale(1.05);
}

.btn-apple-pay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--apple-blue);
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 980px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.3);
}

.btn-apple-pay:hover {
    background: var(--apple-blue-hover);
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(0, 113, 227, 0.4);
}

/* SERVICES GRID & PRICES */
.section-headline {
    text-align: center;
    font-size: 2.2rem;
    line-height: 1.15;
    font-weight: 600;
    margin-bottom: 40px;
    letter-spacing: -0.015em;
    padding-top: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 36px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.service-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--apple-blue);
    margin-bottom: 16px;
}

.service-card ul {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex: 1;
}

.service-card ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 24px;
}

.service-card ul li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--apple-blue);
    font-size: 1.2rem;
    line-height: 1;
}

.bento-grid {
    padding: 40px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.bento-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}

.bento-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.5;
}

.pay-banner {
    background: var(--banner-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    margin: 40px 0 80px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
}

.pay-banner h2 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.pay-banner p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 28px;
    font-size: 1.05rem;
}

/* FOOTER */
footer, .site-footer {
    border-top: 1px solid var(--border) !important;
    padding: 40px 0 32px !important;
    text-align: center !important;
    color: var(--text-secondary) !important;
    font-size: 0.85rem !important;
    margin-top: auto !important;
    background: var(--header-bg) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    transition: background-color 0.4s ease, border-color 0.4s ease !important;
}

.footer-requisites {
    margin-bottom: 24px !important;
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
    color: var(--text-primary) !important;
}

.footer-links {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
    flex-wrap: wrap !important;
}

.footer-links a {
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
    padding: 10px 20px !important;
    border-radius: 980px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    border: 1px solid var(--border) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

.footer-links a:hover {
    background: var(--border) !important;
    transform: scale(1.02) !important;
}

.footer-copyright {
    color: var(--text-secondary) !important;
    font-size: 0.82rem !important;
}

/* ВНУТРЕННИЕ СТРАНИЦЫ И КНОПКА "НАЗАД" */
.single-page-content {
    padding: 60px 0 100px;
    min-height: 60vh;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--apple-blue);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 30px;
    font-size: 1rem;
    transition: 0.2s;
}

.back-link:hover {
    color: var(--apple-blue-hover);
    transform: translateX(-4px);
}

.legal-document {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--card-shadow);
}

.legal-document h1 {
    font-size: 2.2rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.legal-document h2 {
    font-size: 1.4rem;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.legal-document p, .legal-document li {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 14px;
}

.legal-document ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

/* MODAL */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
    z-index: 999999 !important;
}

.modal-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-card {
    background: var(--modal-bg) !important;
    border: 1px solid var(--modal-border) !important;
    padding: 36px 30px !important;
    border-radius: 24px !important;
    width: 100% !important;
    max-width: 400px !important;
    position: relative !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2) !important;
    transform: scale(0.95) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

.modal-overlay.active .modal-card {
    transform: scale(1) !important;
}

.modal-close {
    position: absolute !important;
    top: 18px !important;
    right: 20px !important;
    background: var(--close-btn-bg) !important;
    border: none !important;
    color: var(--text-secondary) !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-close:hover {
    color: var(--text-primary) !important;
}

.modal-card h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    color: var(--text-primary) !important;
    text-align: center !important;
}

.modal-card p {
    color: var(--text-secondary) !important;
    font-size: 0.9rem !important;
    margin-bottom: 20px !important;
    text-align: center !important;
}

.apple-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--apple-blue) !important;
    padding: 4px 14px !important;
    border-radius: 980px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

.form-group { margin-bottom: 20px !important; }
.form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    color: var(--text-secondary) !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

.amount-input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.form-group input.amount-input {
    width: 100% !important;
    padding: 16px 45px 16px 20px !important;
    background: var(--input-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    color: var(--text-primary) !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    font-family: var(--font-family) !important;
}

.form-group input.amount-input:focus {
    outline: none !important;
    border-color: var(--apple-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2) !important;
}

.currency-symbol {
    position: absolute !important;
    right: 20px !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    pointer-events: none !important;
}

/* REDIRECT SCREEN */
.redirect-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--apple-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 868px) {
    .hero-wrapper {
        flex-direction: column-reverse;
        text-align: center;
        gap: 32px;
    }
    .hero-text { text-align: center; }
    .hero h1 { font-size: 2.5rem; }
    .hero .subtitle { font-size: 1.2rem; }
    .hero p { margin-left: auto; margin-right: auto; }
    .hero-photo-container {
        width: 220px;
        height: 220px;
    }
    .modal-card, .legal-document { padding: 24px 20px !important; width: 100% !important; }
}