/* Базовые стили и сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #151515;
    --bg-secondary: #111;
    --bg-tertiary: #25231c;
    --bg-pattern: #0f0e0a;
    --text-primary: #e8e6e1;
    --text-secondary: #a8a6a1;
    --text-tertiary: #6b6964;
    --hover-bg: #25231c;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.home_icon {
  padding-bottom: 9px;
}

/* Паттерн только на первых секциях (главная/внутренние страницы) */
.hero-section,
.content-header {
    position: relative;
    padding: 3.5rem 1.75rem;
    border-radius: 16px;
    overflow: hidden;
    background-color: rgba(28, 28, 28, 0.46);
}

.hero-section::before,
.content-header::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.hero-section > *,
.content-header > * {
    position: relative;
    z-index: 1;
}

/* Header */
.main-header {
    background-color: var(--bg-primary);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    flex-shrink: 0;
    width: 39px;
    height: auto;
}

.logo_text_position {
  line-height: 1;
  }
  
.logo-text {
    font-size: 32px;
  font-weight: 200;
  color: var(--text-primary);
  text-transform: uppercase;
  font-style: italic;
  
}

.btn-login {
    padding: 0.625rem 1.5rem;
    background-color: #2b2b2b;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
    letter-spacing: 2px;
}

.btn-login:hover {
    background-color: #35332a;
    color: var(--text-primary);
}

/* Main content */
main {
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
}

/* Hero section */
.hero-section {
    text-align: center;
    margin-bottom: 5rem;
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-text {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

/* Page buttons */
.page-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background-color: #2b2b2b;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 200px;
    width: 100%;
}

.page-btn .btn-icon {
    flex-shrink: 0;
    color: var(--text-secondary);
    max-width: 24px;
    height: auto;
}

.text_pos_sp {
    margin: 0 auto;
    line-height: 1;
    }
    
.text_sp {
  font-size: 20px;
  letter-spacing: 4px;
    }

.page-btn:hover {
    background-color: #35332a;
    transform: translateY(-2px);
}

.page-btn:hover .btn-icon {
    color: var(--text-primary);
}

/* About section */
.about-section {
    margin-top: 4rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    width: 100%;
    height: auto;
    max-width: 500px;
    border-radius: 8px;
    object-fit: cover;
}

/* Footer */
.main-footer {
    position: relative;
    z-index: 1;
    background-color: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.main-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Content pages styles */
.content-header {
    text-align: center;
    margin-bottom: 3rem;
}

.content-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.content-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.guide-section {
    margin-bottom: 4rem;
}

.guide-section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.guide-section p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-image {
    width: 100%;
    height: 200px;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-text {
    padding: 1.5rem;
}

.gallery-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.gallery-text p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Кнопка домой */
.home-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background-color: #2a2820;
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 3rem;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.home-button:hover {
    background-color: #35332a;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Разнообразные стили для страниц */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.full-width-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.title_tor_main {
  text-transform: uppercase;
  }

.card_title_two {
  margin-bottom: 28px;
  text-transform: uppercase;
}

.card_title_h {
  text-align: center;
  margin-top: 108px;
  margin-bottom: 60px;
  text-transform: uppercase;
}

.card-grid {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    padding: 5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-4px);
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
    text-transform: uppercase;
    font-size: 18px;
}

.card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.tor_title_end {
  text-transform: uppercase;
  text-align: center;
  margin-top: 60px;
}

.tor_text_end {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 20px;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--bg-tertiary);
}

.feature-list li:last-child {
    border-bottom: none;
}

.image-text-block {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.image-text-block.reverse {
    flex-direction: row-reverse;
}

.image-text-block img {
    flex: 1;
    max-width: 300px;
    border-radius: 8px;
    object-fit: cover;
}

.image-text-block .text-content {
    flex: 1;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-nav {
        padding: 0 1rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .page-buttons {
        grid-template-columns: 1fr;
    }

    .page-btn {
        min-width: 100%;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .hero-text {
        margin-bottom: 2rem;
    }

    .two-column,
    .three-column {
        grid-template-columns: 1fr;
    }

    .image-text-block {
        flex-direction: column;
    }

    .image-text-block.reverse {
        flex-direction: column;
    }

    .home-button {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .card-grid {
    display: grid;
    grid-template-columns: auto;
    gap: 2rem;
    margin-bottom: 4rem;
}
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1rem;
    }

    .btn-login {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .page-btn {
        padding: 1rem;
        font-size: 0.8125rem;
    }
}

/* Улучшения для SEO и доступности */
img {
    max-width: 100%;
    height: auto;
}

a:focus,
button:focus {
    outline: 2px solid var(--text-secondary);
    outline-offset: 2px;
}

/* Плавные переходы */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Плавающие капли/кометы */
.droplets-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.droplet {
    position: absolute;
    width: 3px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(200, 198, 192, 0.7) 0%, rgba(168, 166, 161, 0.35) 50%, rgba(168, 166, 161, 0.12) 100%);
    transform: translateY(-20px);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.droplet--comet {
    height: 32px;
    width: 2px;
    background: linear-gradient(to bottom, rgba(200, 198, 192, 0.5) 0%, rgba(168, 166, 161, 0.2) 40%, transparent 100%);
}

.droplet--s1 { animation: droplet-fall 18s linear infinite; }
.droplet--s2 { animation: droplet-fall 25s linear infinite; }
.droplet--s3 { animation: droplet-fall 32s linear infinite; }
.droplet--s4 { animation: droplet-fall 28s linear infinite; }
.droplet--s5 { animation: droplet-fall 22s linear infinite; }
.droplet--s6 { animation: droplet-fall 35s linear infinite; }
.droplet--s7 { animation: droplet-fall 20s linear infinite; }
.droplet--s8 { animation: droplet-fall 30s linear infinite; }

@keyframes droplet-fall {
    from { transform: translateY(-40px); opacity: 0; }
    3% { opacity: 1; }
    to { transform: translateY(100vh); opacity: 0.5; }
}
