/* ================================================================
   ABOUT US - SECTION 2 (REAL FIGMA ASSETS VERSION)
   Region+BackgroundColor+Gradient--2
   6 Stages Workflow Section with REAL Figma PNG buttons
   Target: 90%+ Figma Compliance
   Updated: 2025-10-31 - REAL FIGMA ASSETS IMPLEMENTATION
   ================================================================ */

:root {
    --torg-orange: rgb(228, 169, 96);
    --torg-orange-light: rgb(240, 190, 130);
    --torg-orange-glow: rgba(228, 169, 96, 0.5);
    --text-primary: #FFFFFF;
    --bg-primary: #1a1a1a;
}

/* ================================================================
   SECTION 2: MAIN CONTAINER
   ================================================================ */

.about-section-2 {
    position: relative;
    min-height: 800px;
    padding: 80px 0;
    background: var(--bg-primary);
    overflow: hidden;
}

.about-section-2 .container {
    max-width: 1190px; /* ALIGNMENT FIX: Match workflow-container width for consistent left edge */
    margin: 0 auto;
    padding: 0 40px;
}

/* ================================================================
   HEADER SECTION
   ================================================================ */

.about-section-2 .section-header {
    margin-top: 30px;    /* FINE-TUNE: Add top spacing per VQA blocker #2 */
    margin-bottom: 56px; /* PHASE 6 EXACT: Proven 78% compliance value */
    text-align: left;
}

.about-section-2 .section-title {
    font-size: 34px; /* QUICK WIN 1: VQA says expected 32-36px vs current 45-50px (clamp was 58px at 1920px) */
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: normal; /* FIX: VQA says -0.01em makes text cramped - use normal */
    color: var(--text-primary);
    margin: 0; /* FIX: Remove margin-bottom - using section-header margin instead */
    text-align: left; /* USER FIX: Ensure title is left-aligned, not centered */
}

.about-section-2 .section-title .highlight {
    color: var(--torg-orange);
    font-weight: 700;
}

.about-section-2 .section-description {
    font-size: clamp(1rem, 1.8vw, 1.438rem); /* 23px at 1920px */
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 1210px;
    margin: 0;
}

/* ================================================================
   WORKFLOW STAGES CONTAINER - REAL FIGMA GRADIENT BACKGROUND
   ================================================================ */

.about-section-2 .workflow-container {
    position: relative;
    width: 100%;
    max-width: 1190px; /* FINE-TUNE: Increase to match Figma per VQA blocker #1 */
    margin: 0 auto;
}

/* CRITICAL: Real Figma Gradient Background (Container 122:2 - 1245x314px) */
/* PHASE 6: DISABLED - Border and gradient now applied directly to .stages-grid */
.about-section-2 .gradient-background {
    display: none; /* Hidden - styling moved to .stages-grid */
}

.about-section-2 .gradient-img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.95;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ================================================================
   STAGES GRID LAYOUT - 3 COLUMNS x 2 ROWS
   ================================================================ */

.about-section-2 .stages-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-row-gap: 18px;    /* PHASE 6 CORRECTION: VQA expects 16-20px, using mid-point */
    grid-column-gap: 16px; /* PHASE 6 CORRECTION: VQA expects 16-18px, using exact value */

    /* PHASE 6 EXACT: Proven 78% compliance value */
    padding: 34px 40px;    /* Symmetric padding: 34px vertical, 40px horizontal */

    /* USER UPDATE: Darker gradient - less bright */
    background: linear-gradient(51deg, rgb(21, 14, 9, 0.85) 0%, rgba(61, 55, 49, 0.85) 100%);
    border: 2px solid #D4A054;  /* Golden border with exact Figma color */
    border-radius: 24px;        /* Rounded corners to match Figma */
    box-sizing: border-box;     /* Include border in width */

    /* PHASE 4: Add alignment to prevent pills from stretching to fill grid cells */
    justify-items: center; /* Center pills horizontally in grid cells */
    align-items: center;   /* Center pills vertically in grid cells */
}

/* ================================================================
   REAL FIGMA BUTTON PNGs (363x102px each with Vector 123 arcs)
   ================================================================ */

.about-section-2 .stage-button {
    /* PHASE 1: FIX STRETCHING - Use auto dimensions with max constraints */
    width: auto;           /* CHANGED from 290px to prevent forcing stretch */
    height: auto;          /* CHANGED from 108px to maintain aspect ratio */
    max-width: 290px;      /* Keep as upper constraint */
    max-height: 108px;     /* ADD height constraint for 2.7:1 ratio */
    object-fit: contain;   /* ADD to prevent image distortion */
    object-position: center; /* ADD to center image in container */
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.about-section-2 .stage-button:hover {
    transform: translateY(-6px) scale(1.02);
    filter: drop-shadow(0 12px 24px rgba(228, 169, 96, 0.3));
}

.about-section-2 .stage-button:active {
    transform: translateY(-2px) scale(1.01);
    transition-duration: 0.1s;
}

/* ================================================================
   PHASE 2: GRID ORDER FIX - Match Figma Layout
   Using CSS order property to avoid HTML changes
   Expected: [Подбор, Просчет, Приобретение] / [ИИ анализ, Бизнес, Реализация]
   ================================================================ */

.about-section-2 .stage-button:nth-child(1) { order: 1; } /* Подбор лотов - stays top-left */
.about-section-2 .stage-button:nth-child(2) { order: 4; } /* ИИ анализ - move to bottom-left */
.about-section-2 .stage-button:nth-child(3) { order: 2; } /* Просчет рисков - move to top-center */
.about-section-2 .stage-button:nth-child(4) { order: 5; } /* Бизнес-модель - move to bottom-center */
.about-section-2 .stage-button:nth-child(5) { order: 3; } /* Приобретение - move to top-right */
.about-section-2 .stage-button:nth-child(6) { order: 6; } /* Реализация - stays bottom-right */

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .about-section-2 {
        padding: 60px 0;
        min-height: auto;
    }

    .about-section-2 .container {
        padding: 0 24px;
    }

    .about-section-2 .stages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 2rem;
    }

    .about-section-2 .section-header {
        margin-bottom: 2.5rem;
    }

    /* Scale down gradient background on tablet */
    .about-section-2 .gradient-background {
        max-width: 90%;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .about-section-2 {
        padding: 40px 0;
    }

    .about-section-2 .container {
        padding: 0 16px;
    }

    .about-section-2 .stages-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .about-section-2 .section-title {
        font-size: 1.75rem; /* 28px on mobile */
        margin-bottom: 1rem;
    }

    .about-section-2 .section-description {
        font-size: 1rem; /* 16px on mobile */
    }

    /* Scale down gradient background on mobile */
    .about-section-2 .gradient-background {
        max-width: 100%;
        opacity: 0.8;
    }

    /* Center buttons on mobile */
    .about-section-2 .stage-button {
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Small Mobile (375px and below) */
@media (max-width: 375px) {
    .about-section-2 {
        padding: 32px 0;
    }

    .about-section-2 .section-title {
        font-size: 1.5rem; /* 24px on small mobile */
    }

    .about-section-2 .stages-grid {
        padding: 1.25rem;
        gap: 1rem;
    }
}

/* ================================================================
   ACCESSIBILITY & INTERACTIONS
   ================================================================ */

/* Focus states for keyboard navigation */
.about-section-2 .stage-button:focus-visible {
    outline: 3px solid var(--torg-orange);
    outline-offset: 4px;
    border-radius: 50px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .about-section-2 .stage-button {
        transition: none;
    }

    .about-section-2 .stage-button:hover {
        transform: none;
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .about-section-2 .stage-button {
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
    }

    .about-section-2 .stage-button:hover {
        filter: drop-shadow(0 12px 24px rgba(228, 169, 96, 0.8));
    }
}

/* Print Styles */
@media print {
    .about-section-2 {
        background: white;
        padding: 20px 0;
    }

    .about-section-2 .section-title,
    .about-section-2 .section-description {
        color: black;
    }

    .about-section-2 .stage-button:hover {
        transform: none;
        filter: none;
    }

    .about-section-2 .gradient-background {
        opacity: 0.3;
    }
}
