/* ====================================
   Magic Tarologist Theme - Main Styles
   Mobile First Approach
   ==================================== */

/* ------------------------------------
   CSS Variables
   ------------------------------------ */
:root {
    --color-primary: #1a0533;
    --color-primary-light: #2d1b69;
    --color-primary-lighter: #3d2b79;
    --color-accent: #c9a84c;
    --color-accent-light: #e8d18a;
    --color-accent-dark: #a88a2e;
    --color-dark: #0d0219;
    --color-dark-alt: #150826;
    --color-light: #f0e6ff;
    --color-lighter: #ffffff;
    --color-text: #d0c0e0;
    --color-text-light: #a090b8;
    --color-text-dark: #1a0533;
    --color-card-bg: rgba(45, 27, 105, 0.4);
    --color-card-border: rgba(201, 168, 76, 0.2);
    --color-overlay: rgba(13, 2, 25, 0.85);
    --color-success: #4caf50;
    --color-error: #f44336;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 4px 20px rgba(201, 168, 76, 0.2);
    --radius: 12px;
    --radius-lg: 20px;
    --max-width: 1200px;
    --header-height: 70px;
}

/* ------------------------------------
   Reset & Base Styles
   ------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-accent-light);
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-lighter);
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

/* ------------------------------------
   Container
   ------------------------------------ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Inner pages must clear the fixed header (the front page is excluded:
   its full-screen hero intentionally sits under the header). */
body:not(.home) .main-content {
    padding-top: calc(var(--header-height) + 30px);
}

/* ------------------------------------
   Typography
   ------------------------------------ */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 12px;
    position: relative;
}

.section-tag::before,
.section-tag::after {
    content: '\2605';
    margin: 0 8px;
    opacity: 0.5;
}

.section-header h2 {
    margin-bottom: 15px;
}

.section-desc {
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

/* ------------------------------------
   Buttons
   ------------------------------------ */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: var(--color-text-dark);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
    color: var(--color-text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-outline:hover {
    background: var(--color-accent);
    color: var(--color-text-dark);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

/* ------------------------------------
   Header & Navigation
   ------------------------------------ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 2, 25, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-branding a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-lighter);
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.site-logo {
    font-size: 1.8rem;
    color: var(--color-accent);
}

/* Mobile Menu */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-dark-alt);
    padding: 100px 30px 30px;
    transition: right 0.4s ease;
    z-index: 999;
    border-left: 1px solid rgba(201, 168, 76, 0.1);
}

.main-nav.active {
    right: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-list li a {
    display: block;
    padding: 12px 16px;
    color: var(--color-text);
    font-size: 0.95rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-list li a:hover,
.nav-list li.current-menu-item a {
    color: var(--color-accent);
    background: rgba(201, 168, 76, 0.1);
}

.header-social {
    display: none;
    align-items: center;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(201, 168, 76, 0.1);
    color: var(--color-accent);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--color-accent);
    color: var(--color-text-dark);
    transform: translateY(-2px);
}

/* ------------------------------------
   Hero Section
   ------------------------------------ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(45, 27, 105, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(201, 168, 76, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(26, 5, 51, 1) 0%, var(--color-dark) 100%);
    z-index: 0;
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 4s ease-in-out infinite;
    animation-delay: var(--d);
    box-shadow: 0 0 10px var(--color-accent), 0 0 20px rgba(201, 168, 76, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 1px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, var(--color-accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

/* ------------------------------------
   Services Section
   ------------------------------------ */
.services-section,
.cases-section,
.articles-section,
.contact-section {
    padding: 60px 0;
    position: relative;
}

.about-education,
.about-principles {
    padding: 60px 0;
    position: relative;
}

.services-section {
    background: var(--color-dark-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.service-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius);
    padding: 30px 24px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(201, 168, 76, 0.4);
    box-shadow: var(--shadow-gold);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.service-card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.service-link {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ------------------------------------
   Cases Section
   ------------------------------------ */
.cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.case-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(201, 168, 76, 0.3);
}

.case-card-image img,
.case-card-image .case-placeholder {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.case-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    font-size: 3rem;
    color: var(--color-accent);
}

.case-card-body {
    padding: 20px;
}

.case-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.case-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

/* ------------------------------------
   Articles Section
   ------------------------------------ */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.article-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(201, 168, 76, 0.3);
}

.article-card-image {
    height: 200px;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-body {
    padding: 20px;
}

.article-date {
    font-size: 0.8rem;
    color: var(--color-text-light);
    display: block;
    margin-bottom: 8px;
}

.article-card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.article-card-title a {
    color: var(--color-lighter);
}

.article-card-title a:hover {
    color: var(--color-accent);
}

.article-card-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ------------------------------------
   Contact Section
   ------------------------------------ */
.contact-section {
    background:
        radial-gradient(ellipse at 0% 50%, rgba(45, 27, 105, 0.3) 0%, transparent 50%),
        var(--color-dark-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.contact-info h2 {
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.contact-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.contact-social-btn.tg {
    background: rgba(0, 136, 204, 0.15);
    color: #0088cc;
    border: 1px solid rgba(0, 136, 204, 0.3);
}

.contact-social-btn.tg:hover {
    background: #0088cc;
    color: #fff;
}

.contact-social-btn.vk {
    background: rgba(0, 119, 255, 0.15);
    color: #0077ff;
    border: 1px solid rgba(0, 119, 255, 0.3);
}

.contact-social-btn.vk:hover {
    background: #0077ff;
    color: #fff;
}

.form-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    backdrop-filter: blur(10px);
}

.form-card h3 {
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.form-card > p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* ------------------------------------
   Forms
   ------------------------------------ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-group .required {
    color: var(--color-accent);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-lighter);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder {
    color: var(--color-text-light);
    opacity: 0.6;
}

.form-group input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.form-message {
    margin-top: 12px;
    font-size: 0.9rem;
    padding: 10px 14px;
    border-radius: 8px;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(76, 175, 80, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message.error {
    display: block;
    background: rgba(244, 67, 54, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ------------------------------------
   Modal
   ------------------------------------ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--color-primary);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    max-width: 460px;
    width: 100%;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 1.8rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-lighter);
}

.modal-header {
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* ------------------------------------
   Floating Social Buttons
   ------------------------------------ */
.floating-social {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    animation: floatIn 0.5s ease;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.float-btn:hover {
    transform: scale(1.1);
}

.float-btn.tg { background: #0088cc; color: #fff; }
.float-btn.vk { background: #0077ff; color: #fff; }
.float-btn.callback-btn {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: var(--color-text-dark);
}

/* ------------------------------------
   Footer
   ------------------------------------ */
.site-footer {
    background: var(--color-dark);
    border-top: 1px solid rgba(201, 168, 76, 0.1);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 2rem;
    color: var(--color-accent);
    display: block;
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-lighter);
    margin-bottom: 16px;
}

.footer-menu li {
    margin-bottom: 8px;
}

.footer-menu li a {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.footer-menu li a:hover {
    color: var(--color-accent);
}

.footer-contact li {
    margin-bottom: 8px;
}

.footer-contact li a {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.footer-contact li a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* ------------------------------------
   Breadcrumbs
   ------------------------------------ */
.breadcrumbs {
    padding: 20px 0;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.breadcrumbs a {
    color: var(--color-text-light);
}

.breadcrumbs a:hover {
    color: var(--color-accent);
}

.breadcrumbs .current {
    color: var(--color-accent);
}

/* ------------------------------------
   About Page
   ------------------------------------ */
.about-hero {
    padding: 0 0 60px;
}

.about-hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.photo-frame {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-accent);
    box-shadow: var(--shadow-gold);
    position: relative;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-accent);
    font-size: 0.9rem;
    gap: 8px;
}

.photo-placeholder .placeholder-icon {
    font-size: 3rem;
}

.about-info h1 {
    margin-bottom: 8px;
}

.about-subtitle {
    color: var(--color-accent);
    font-size: 1rem;
    margin-bottom: 20px;
}

.about-text {
    color: var(--color-text-light);
    line-height: 1.7;
}

.about-text p {
    margin-bottom: 12px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-accent);
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* Education Timeline */
.education-timeline {
    position: relative;
    padding-left: 30px;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 3px solid var(--color-dark);
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.4);
}

.timeline-year {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.timeline-content p {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Principles Grid */
.principles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

.principle-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.principle-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 168, 76, 0.3);
    box-shadow: var(--shadow-gold);
}

.principle-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.principle-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.principle-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* ------------------------------------
   Services Page (Full)
   ------------------------------------ */
.services-page {
    padding: 0 0 60px;
}

.services-page h1 {
    margin-bottom: 16px;
}

.services-page > .container > p {
    color: var(--color-text-light);
    margin-bottom: 40px;
}

.services-full-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.service-full-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 30px 24px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.service-full-card:hover {
    border-color: rgba(201, 168, 76, 0.3);
    box-shadow: var(--shadow-md);
}

.service-full-icon {
    font-size: 3rem;
    text-align: center;
    color: var(--color-accent);
}

.service-full-body h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.service-full-desc {
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.service-features {
    margin-bottom: 20px;
}

.service-features li {
    padding: 8px 0 8px 20px;
    position: relative;
    color: var(--color-text);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.service-features li::before {
    content: '\2605';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 0.7rem;
    top: 10px;
}

.service-features li:last-child {
    border-bottom: none;
}

/* ------------------------------------
   Single Article
   ------------------------------------ */
.single-article {
    padding: 0 0 60px;
}

.article-header {
    margin-bottom: 24px;
}

.article-header h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.meta-sep {
    margin: 0 8px;
    opacity: 0.3;
}

.article-meta a {
    color: var(--color-accent);
}

.article-featured-image {
    margin-bottom: 30px;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-content {
    max-width: 800px;
    line-height: 1.8;
    color: var(--color-text);
}

.article-content p {
    margin-bottom: 16px;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 30px;
    margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 16px;
    padding-left: 20px;
}

.article-content ul li {
    list-style: disc;
    margin-bottom: 8px;
}

.article-content ol li {
    list-style: decimal;
    margin-bottom: 8px;
}

.article-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.share-link {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.share-link.tg { background: rgba(0, 136, 204, 0.15); color: #0088cc; }
.share-link.vk { background: rgba(0, 119, 255, 0.15); color: #0077ff; }

.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.article-nav-link {
    padding: 20px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.article-nav-link:hover {
    border-color: rgba(201, 168, 76, 0.3);
}

.article-nav-link.next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-bottom: 4px;
}

.nav-title {
    font-weight: 600;
    color: var(--color-lighter);
}

/* ------------------------------------
   Page Content
   ------------------------------------ */
.page-content {
    padding: 0 0 60px;
}

.page-content h1 {
    margin-bottom: 24px;
}

.entry-content {
    max-width: 800px;
    color: var(--color-text);
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 16px;
}

/* ------------------------------------
   Error 404
   ------------------------------------ */
.error-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.error-content {
    padding: 60px 0;
}

.error-code {
    font-family: var(--font-heading);
    font-size: 6rem;
    color: var(--color-accent);
    display: block;
    line-height: 1;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(201, 168, 76, 0.3);
}

.error-content h1 {
    margin-bottom: 12px;
}

.error-content p {
    color: var(--color-text-light);
    margin-bottom: 24px;
}

/* ------------------------------------
   Pagination
   ------------------------------------ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-card-border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--color-text);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.pagination .current {
    background: var(--color-accent);
    color: var(--color-text-dark);
    border-color: var(--color-accent);
}

/* ------------------------------------
   Search
   ------------------------------------ */
.search-results {
    margin-top: 30px;
}

.search-item {
    padding: 20px;
    margin-bottom: 16px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius);
}

.search-item h2 {
    margin-bottom: 8px;
}

.search-item h2 a {
    color: var(--color-lighter);
}

.search-item h2 a:hover {
    color: var(--color-accent);
}

.search-excerpt {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* ------------------------------------
   Media Queries - Tablet (768px+)
   ------------------------------------ */
@media (min-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.6rem; }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-subtitle {
        font-size: 1.15rem;
    }

    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-hero-inner {
        grid-template-columns: 1fr 1.5fr;
        gap: 50px;
        align-items: start;
    }

    .about-stats {
        gap: 20px;
    }

    .principles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-features li {
        font-size: 0.95rem;
    }

    .section-header {
        margin-bottom: 50px;
    }

    .education-timeline {
        padding-left: 40px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* ------------------------------------
   Media Queries - Desktop (1024px+)
   ------------------------------------ */
@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }

    .main-nav {
        position: static;
        width: auto;
        height: auto;
        background: none;
        padding: 0;
        border: none;
    }

    .nav-list {
        flex-direction: row;
        gap: 0;
    }

    .nav-list li a {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .header-social {
        display: flex;
    }

    .services-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .principles-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .service-full-card {
        grid-template-columns: 80px 1fr;
        gap: 30px;
    }

    .service-full-icon {
        text-align: right;
    }

    .about-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .services-section,
    .cases-section,
    .articles-section,
    .contact-section,
    .about-education,
    .about-principles {
        padding: 80px 0;
    }
}

/* ------------------------------------
   Media Queries - Large Desktop (1200px+)
   ------------------------------------ */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 3.8rem;
    }

    .services-full-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ------------------------------------
   Animations
   ------------------------------------ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }

/* Scroll-triggered animations */
.service-card,
.case-card,
.article-card,
.principle-card,
.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.visible,
.case-card.visible,
.article-card.visible,
.principle-card.visible,
.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Selection */
::selection {
    background: var(--color-accent);
    color: var(--color-text-dark);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-dark);
}

/* ====================================
   Magic & Atmosphere
   Lightweight: animations only use
   transform/opacity (GPU-safe), few
   painted layers, honors reduced-motion.
   ==================================== */

/* ------------------------------------
   Global ambient background
   ------------------------------------ */
.site-wrapper {
    position: relative;
    z-index: 1;
}

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Nebula blobs — static blur, animated only on transform/opacity */
.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform, opacity;
}

.neb-1 {
    width: 70vmax;
    height: 70vmax;
    left: -15vmax;
    top: -20vmax;
    background: radial-gradient(circle, rgba(45, 27, 105, 0.55) 0%, transparent 70%);
    animation: nebDrift1 32s ease-in-out infinite alternate;
}

.neb-2 {
    width: 60vmax;
    height: 60vmax;
    right: -20vmax;
    top: 30%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.14) 0%, transparent 70%);
    animation: nebDrift2 40s ease-in-out infinite alternate;
}

.neb-3 {
    width: 55vmax;
    height: 55vmax;
    left: 5%;
    bottom: -30vmax;
    background: radial-gradient(circle, rgba(61, 43, 121, 0.35) 0%, transparent 70%);
    animation: nebDrift3 36s ease-in-out infinite alternate;
}

@keyframes nebDrift1 {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.9; }
    100% { transform: translate3d(6vmax, 8vmax, 0) scale(1.15); opacity: 1; }
}

@keyframes nebDrift2 {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.8; }
    100% { transform: translate3d(-5vmax, -6vmax, 0) scale(1.2); opacity: 1; }
}

@keyframes nebDrift3 {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
    100% { transform: translate3d(4vmax, -8vmax, 0) scale(1.1); opacity: 1; }
}

/* Starfield — spans generated by JS, twinkle via opacity */
.starfield {
    position: absolute;
    inset: 0;
}

.starfield .star {
    position: absolute;
    border-radius: 50%;
    background: var(--color-lighter);
    opacity: 0;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    animation: twinkle var(--tw) ease-in-out infinite;
    animation-delay: var(--twd);
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.6); }
    50%      { opacity: 0.9; transform: scale(1); }
}

/* ------------------------------------
   Hero fog (magic smoke)
   ------------------------------------ */
.hero-fog {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.fog {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    background: radial-gradient(circle, rgba(201, 168, 76, 0.13) 0%, transparent 70%);
    will-change: transform, opacity;
}

.fog-1 {
    width: 55vmax;
    height: 55vmax;
    left: -20vmax;
    top: 10%;
    animation: fogDrift1 22s ease-in-out infinite alternate;
}

.fog-2 {
    width: 48vmax;
    height: 48vmax;
    right: -15vmax;
    top: 20%;
    background: radial-gradient(circle, rgba(150, 120, 255, 0.12) 0%, transparent 70%);
    animation: fogDrift2 26s ease-in-out infinite alternate;
}

.fog-3 {
    width: 40vmax;
    height: 40vmax;
    left: 35%;
    bottom: -8vmax;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.1) 0%, transparent 70%);
    animation: fogDrift3 20s ease-in-out infinite alternate;
}

@keyframes fogDrift1 {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.6; }
    100% { transform: translate3d(10vmax, -5vmax, 0) scale(1.25); opacity: 1; }
}

@keyframes fogDrift2 {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.55; }
    100% { transform: translate3d(-9vmax, 6vmax, 0) scale(1.2); opacity: 0.95; }
}

@keyframes fogDrift3 {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.5; }
    100% { transform: translate3d(-7vmax, -8vmax, 0) scale(1.3); opacity: 0.9; }
}

/* ------------------------------------
   Rotating astrology ornaments
   ------------------------------------ */
.ornaments {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.ornament {
    position: absolute;
    color: var(--color-accent);
    opacity: 0.08;
    user-select: none;
    will-change: transform;
}

.orn-ring {
    width: 46vmin;
    height: 46vmin;
    right: -12vmin;
    top: 18%;
    border: 1px solid var(--color-accent);
    border-radius: 50%;
    animation: slowRotate 60s linear infinite;
}

.orn-ring::after {
    content: '';
    position: absolute;
    inset: 8%;
    border: 1px dashed var(--color-accent);
    border-radius: 50%;
    animation: slowRotate 40s linear infinite reverse;
}

.orn-zodiac {
    font-size: 26vmin;
    left: -8vmin;
    bottom: 2%;
    animation: slowRotate 90s linear infinite;
}

.orn-moon {
    font-size: 15vmin;
    left: 12%;
    top: 16%;
    animation: slowRotate 70s linear infinite reverse;
}

.orn-star {
    font-size: 8vmin;
    right: 22%;
    bottom: 20%;
    animation: slowRotate 50s linear infinite;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Section header — subtle glowing magic behind headings */
.section-header {
    position: relative;
}

.section-header::after {
    content: '\27A0';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(12rem, 30vw, 26rem);
    color: var(--color-accent);
    opacity: 0.03;
    z-index: -1;
    animation: slowRotate 100s linear infinite;
    pointer-events: none;
}

/* ------------------------------------
   Scroll reveal — mysterious fade + glow
   ------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reveal-glow.visible {
    animation: glowIn 1.1s ease;
}

@keyframes glowIn {
    0%   { box-shadow: 0 0 0 rgba(201, 168, 76, 0); }
    60%  { box-shadow: 0 0 24px rgba(201, 168, 76, 0.25); }
    100% { box-shadow: 0 0 0 rgba(201, 168, 76, 0); }
}

/* ------------------------------------
   Reduced motion — keep it light & accessible
   ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .nebula,
    .starfield .star,
    .fog,
    .ornament,
    .section-header::after,
    .reveal,
    .reveal-glow.visible {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
