@import '../../app/css/variables.css';

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

a {
    color: #e84118;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff4757;
    text-decoration: underline;
}

/* Main content - АДАПТИВНЫЕ РАССТОЯНИЯ */
section {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(30px, 4vw, 60px);
    padding: clamp(20px, 3vw, 40px) clamp(15px, 2vw, 30px);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    align-items: center;
}

/* НОВАЯ РАЗМЕТКА - ДВЕ КОЛОНКИ */
.main-content-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: clamp(40px, 5vw, 80px);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

/* ЛЕВАЯ КОЛОНКА - ВИДЕО И КНОПКИ */
.left-column {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3vw, 30px);
    position: sticky;
    top: 20px;
}

.video-section {
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 2vw, 25px);
    align-items: center;
}

/* ПРАВАЯ КОЛОНКА - ТЕКСТ И СКРОЛЛ */
.right-column {
    display: flex;
    flex-direction: column;
    gap: clamp(30px, 4vw, 50px);
    min-width: 0;
}

/* Video styling */
video {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 200px;
    height: auto;
}

/* App buttons container */
.app-buttons {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.5vw, 15px);
    justify-content: center;
    width: 100%;
    align-items: center;
}

.app-btn {
    width: clamp(140px, 40vw, 160px);
    height: auto;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.app-btn:hover {
    transform: scale(1.05);
}

/* Text content */
.text-content {
    width: 100%;
}

/* Gemstone valuation section */
.gemstone-valuation {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: clamp(10px, 2vw, 15px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin-bottom: 0;
    width: 100%;
}

.gemstone-valuation h2 {
    color: #2c3e50;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-align: left;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.3;
}

.lead {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.6;
    text-align: left;
    margin-bottom: 0;
    color: #555;
}

/* Scroll container */
.valuation-scroll-container {
    width: 100%;
    margin-top: 0;
}

.valuation-points {
    display: flex;
    flex-direction: row;
    gap: 1.2rem;
    padding: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #e84118 #f1f1f1;
    scroll-behavior: smooth;
    -webkit-overflow-scoring: touch;
    max-width: 100%;
}

.valuation-points::-webkit-scrollbar {
    height: 6px;
}

.valuation-points::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
    margin: 0 15px;
}

.valuation-points::-webkit-scrollbar-thumb {
    background: #e84118;
    border-radius: 10px;
}

.valuation-points::-webkit-scrollbar-thumb:hover {
    background: #c23616;
}

/* Point styles */
.point {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    border-left: 4px solid #e84118;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 200px;
    height: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.point:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.point h3 {
    color: #e84118;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.6rem 0;
    line-height: 1.2;
}

.point p {
    color: #666;
    line-height: 1.3;
    font-size: 0.85rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Questions and Answers Section - ОБНОВЛЕННЫЙ СТИЛЬ */
.result-cta {
    text-align: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(135deg, #e84118 0%, #c23616 100%);
    border-radius: clamp(10px, 2vw, 15px);
    color: white;
    width: 100%;
    max-width: min(90vw, 800px);
    margin: 0 auto;
}

.result {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    margin: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.qa-main {
    display: block;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.qa-line {
    display: block;
    text-align: left;
    font-weight: 400;
    line-height: 1.5;
}

.qa-link-wrapper {
    display: block;
    margin-top: 1rem;
    text-align: center;
}

.qa-link {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    border: 2px solid #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    backdrop-filter: blur(5px);
}

.qa-link:hover {
    background-color: #ffffff;
    color: #e84118;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* Navigation links */
.page-links {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 2vw, 1.5rem);
    flex-wrap: wrap;
    width: 100%;
    max-width: min(90vw, 800px);
}

.page-links a {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 600;
    padding: clamp(0.6rem, 1.5vw, 0.8rem) clamp(1rem, 2vw, 1.5rem);
    border: 2px solid #e84118;
    border-radius: clamp(4px, 1vw, 6px);
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
    min-width: min-content;
    color: #e84118;
}

.page-links a:hover {
    background: #e84118;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Контейнер для блока процесса */
.process-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Process steps grid - ОБНОВЛЕННЫЙ ДЛЯ 4 КОЛОНОК НА ШИРОКОМ ЭКРАНЕ */
article.splines-block {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 колонки на широких экранах */
    grid-template-rows: repeat(3, auto); /* 3 ряда по 4 элемента */
    gap: 40px;
    padding: 2.5rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 0;
    width: 100%;
    max-width: min(calc(100vw - 30px), 1400px);
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
}

/* PROCESS-POINT - УВЕЛИЧЕННЫЙ РАЗМЕР */
a.process-point {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    min-height: 140px; /* Увеличенная высота */
    text-decoration: none;
    color: #333;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    justify-content: space-between;
    position: relative;
}

a.process-point:hover {
    background: #e84118;
    color: white;
    transform: translateY(-5px);
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(232, 65, 24, 0.2);
    border-color: #e84118;
}

/* Вертикальный текст - увеличен */
.vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-right: 12px;
    font-weight: 700;
    white-space: nowrap;
    font-size: 22px;
    line-height: 1.2;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    max-width: 100%;
    text-align: center;
}

/* ИКОНКА - ЗНАЧИТЕЛЬНО УВЕЛИЧЕНА */
.process-icon {
    margin: 0 12px;
    border-radius: 8px;
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 180px; /* Увеличенный размер картинки */
    height: auto;
    aspect-ratio: 1/1;
    object-fit: contain;
    flex-shrink: 1;
    object-position: center;
    background: white;
    padding: 8px;
}

/* СТРЕЛКА - увеличенная */
.process-arrow {
    margin-left: 12px;
    transition: transform 0.3s ease;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

a.process-point:hover .process-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.9);
}

a.process-point:hover .process-arrow {
    transform: scale(1.1);
    filter: brightness(0) invert(1);
}

/* АДАПТИВНАЯ СЕТКА ДЛЯ РАЗНЫХ ЭКРАНОВ */

/* Для экранов 1200-1400px - 4 колонки */
@media screen and (max-width: 1400px) {
    article.splines-block {
        gap: 30px;
        padding: 2rem;
    }

    a.process-point {
        min-height: 130px;
        padding: 1rem;
    }

    .process-icon {
        max-width: 160px;
    }
}

/* Для экранов 1024-1199px - 3 колонки */
@media screen and (max-width: 1199px) {
    article.splines-block {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, auto);
        gap: 25px;
        padding: 1.8rem;
    }

    a.process-point {
        min-height: 120px;
        padding: 1rem;
    }

    .process-icon {
        max-width: 140px;
    }

    .vertical-text {
        font-size: 20px;
        height: 60px;
        margin-right: 10px;
    }
}

/* Для планшетов 768-1023px - 2 колонки */
@media screen and (max-width: 1023px) {
    .main-content-layout {
        grid-template-columns: 1fr;
        gap: clamp(40px, 5vw, 60px);
    }

    .left-column {
        position: static;
        align-items: center;
    }

    .video-section {
        max-width: 300px;
        margin: 0 auto;
    }

    .app-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .gemstone-valuation h2,
    .lead {
        text-align: center;
    }

    article.splines-block {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, auto);
        gap: 20px;
        padding: 1.5rem;
        max-width: min(calc(100vw - 30px), 1000px);
    }

    a.process-point {
        min-height: 110px;
        padding: 0.9rem;
    }

    .process-icon {
        max-width: 120px;
    }

    .vertical-text {
        font-size: 20px;
        height: 55px;
        margin-right: 8px;
    }

    .process-arrow {
        width: 20px;
        height: 20px;
    }
}

/* Для мобильных 480-767px - 2 колонки (компактнее) */
@media screen and (max-width: 767px) {
    article.splines-block {
        gap: 15px;
        padding: 1.2rem;
        max-width: min(calc(100vw - 20px), 800px);
    }

    a.process-point {
        min-height: 100px;
        padding: 0.8rem;
    }

    .process-icon {
        max-width: 100px;
        margin: 0 8px;
    }

    .vertical-text {
        font-size: 20px;
        height: 50px;
        margin-right: 6px;
    }

    .process-arrow {
        width: 18px;
        height: 18px;
        margin-left: 8px;
    }

    /* Адаптивность для Questions and Answers */
    .result {
        gap: 0.6rem;
    }

    .qa-line {
        text-align: center;
    }

    .qa-link {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
}

/* Для маленьких мобильных 360-479px - 1 колонка */
@media screen and (max-width: 479px) {
    article.splines-block {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(12, auto);
        gap: 12px;
        padding: 1rem;
        max-width: min(calc(100vw - 20px), 500px);
    }

    a.process-point {
        min-height: 90px;
        padding: 0.7rem;
        justify-content: space-between;
    }

    .vertical-text {
        writing-mode: horizontal-tb;
        transform: none;
        margin-right: 10px;
        font-size: 12px;
        height: auto;
        white-space: normal;
        max-width: 80px;
        line-height: 1.1;
        text-align: left;
    }

    .process-icon {
        max-width: 80px;
        margin: 0 10px;
    }

    .process-arrow {
        width: 16px;
        height: 16px;
        margin-left: 6px;
    }

    .page-links {
        flex-direction: column;
    }

    .page-links a {
        width: 100%;
    }
}

/* Для очень маленьких экранов < 360px */
@media screen and (max-width: 359px) {
    article.splines-block {
        gap: 10px;
        padding: 0.8rem;
    }

    a.process-point {
        min-height: 85px;
        padding: 0.6rem;
    }

    .vertical-text {
        font-size: 11px;
        max-width: 70px;
        margin-right: 8px;
    }

    .process-icon {
        max-width: 70px;
        margin: 0 8px;
    }

    .process-arrow {
        width: 14px;
        height: 14px;
    }
}

/* Утилитарные классы */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.relative { position: relative; }
.grid { display: grid; }

/* Улучшенная поддержка касаний на мобильных */
@media (hover: none) and (pointer: coarse) {
    a.process-point:hover {
        transform: none;
        background: #f8f9fa;
        color: #333;
    }

    a.process-point:active {
        background: #e84118;
        color: white;
        transform: translateY(-1px);
    }

    .point:hover {
        transform: none;
    }

    .point:active {
        transform: translateY(-2px);
    }

    .qa-link:hover {
        transform: none;
        background-color: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

    .qa-link:active {
        background-color: #ffffff;
        color: #e84118;
        transform: translateY(-1px);
    }
}