/* ============================================
   CAPABILITIES CAROUSEL
   Animated text showing bot capabilities
   NEW LAYOUT: Carousel on left, CTA on right
   ============================================ */

/* Hero layout adjustment for new structure */
.hero__jarvis {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Logo positioning */
.jarvis-hologram--video {
    margin-top: 0;
}

/* Founder quote under logo (right side) */
.hero__founder-quote {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Hide founder quote on tablet and mobile */
@media (max-width: 1024px) {
    .hero__founder-quote {
        display: none !important;
    }
}

/* ============================================
   CAROUSEL STYLES
   ============================================ */

.capabilities-carousel {
    display: grid;
    grid-template-columns: 160px 200px; /* Fixed left column width for longest phrase: Автоматизируй контроль */
    gap: 0.5rem 1.5rem;
    margin-top: 2.5rem;
    padding: 0;
    background: transparent;
    border: none;
    width: 360px; /* Fixed total width: 160px + 200px */
}

/* Left-aligned version (in hero__content) */
.capabilities-carousel--left {
    align-items: flex-start;
}

.capability-line {
    display: flex;
    gap: 0.35em;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    white-space: nowrap;
    line-height: 1.5;
}

.capability-base {
    color: var(--text-primary, #1e293b);
    font-weight: 600;
    flex-shrink: 0;
    
}

.capability-word {
    color: var(--cyan-primary, #00D4FF);
    font-weight: 600;
    display: inline-block;
    position: relative;
    
}

/* Word animation */
.capability-word {
    animation: none;
}

.capability-word.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

.capability-word.fade-in {
    animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Divider line */
.capability-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(212, 168, 83, 0.25),
        rgba(0, 212, 255, 0.25),
        transparent
    );
    margin: 0.4rem 0;
}

/* Special line (emotional commands at top) */
.capability-line--special {
    grid-template-columns: 1fr;
    justify-items: start;
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.capability-line--special .capability-base {
    display: none;
}

.capability-line--special .capability-word {
    background: linear-gradient(90deg, var(--gold-primary, #D4A853), var(--cyan-primary, #00D4FF));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-align: left;
    min-width: auto;
}

/* Bottom tagline */
.capability-tagline {
    width: 100%;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted, #94a3b8);
    font-style: italic;
    padding-top: 0.2rem;
}


/* Hero CTA button positioning */
.hero__cta {
    margin-top: 2rem;
    width: fit-content;
}

/* ============================================
   MESSENGER ROTATION IN SUBTITLE
   ============================================ */

.hero__messenger {
    color: var(--cyan-primary, #00D4FF);
    font-weight: 600;
    display: inline-block;
    min-width: 5.5em;
    text-align: left;
}

.hero__messenger.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

.hero__messenger.fade-in {
    animation: fadeIn 0.3s ease-in forwards;
}

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

@media (max-width: 1024px) {
    .capabilities-carousel {
        gap: 0.4rem 1rem;
    }

    .capability-line {
        font-size: 0.9rem;
    }
}

/* Tablet styles (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .capabilities-carousel {
        gap: 0.35rem 1rem;
        margin-top: 1.5rem;
        margin-left: auto;
        margin-right: auto;
    }

    .capability-line {
        font-size: 0.85rem;
    }

    .hero__cta {
        width: auto;
        margin-top: 1.5rem;
    }
}

@media (max-width: 767px) {
    .capabilities-carousel {
        width: 100%;
        max-width: 360px;
        grid-template-columns: 160px 200px;
        gap: 0.3rem 0.5rem;
        margin-top: 1.5rem;
        margin-left: auto;
        margin-right: auto;
    }

    .capability-line {
        font-size: 0.85rem;
    }

    /* CTA button - NOT full width on mobile */
    .hero__cta,
    a.hero__cta,
    a.btn.hero__cta,
    .btn.hero__cta {
        width: auto !important;
        min-width: 240px;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
}

/* Phones ~412px (S24 Ultra etc) */
@media (max-width: 480px) {
    .capabilities-carousel {
        width: 100%;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        grid-template-columns: 160px 1fr;
        gap: 0.3rem 0.8rem;
        margin-top: 1.5rem;
    }

    .capability-line {
        font-size: 0.8rem;
    }
}

/* Phones ~360px (S24, iPhone SE 2nd gen) */
@media (max-width: 380px) {
    .capabilities-carousel {
        grid-template-columns: 130px 1fr;
        gap: 0.3rem 0.6rem;
    }
}

/* Very small screens ~320px */
@media (max-width: 340px) {
    .capabilities-carousel {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        grid-template-columns: 120px 1fr;
        gap: 0.25rem 0.5rem;
    }

    .capability-line {
        font-size: 0.75rem;
    }

    .capability-line:nth-child(n+7) {
        display: none;
    }
}
