/* =================================================================
   Hero Section - Consolidated Stylesheet
   Combines: enhancements, improvements, and visual redesign
   ================================================================= */

/* ===== BASE HERO SECTION STYLES ===== */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
    /* Background image will be set dynamically via data-active-tab */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.6s ease-in-out;
}

/* Default background - Cloud/Kubernetes (overview tab) */
.hero {
    background-image: url('/assets/images/hero/cloud-kubernetes.jpg');
}

/* Background for Strategic tab */
.hero[data-active-tab="strategic"] {
    background-image: url('/assets/images/hero/strategy-planning.jpg');
}

/* Background for Platform tab */
.hero[data-active-tab="platform"] {
    background-image: url('/assets/images/hero/platform-datacenter.jpg');
}

/* Gradient overlay for better text contrast */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(1, 24, 57, 0.5) 0%,
        rgba(1, 24, 57, 0.4) 50%,
        rgba(1, 24, 57, 0.5) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HERO SPLIT LAYOUT ===== */

.hero-split {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 4rem;
    align-items: center;
    margin-top: 1rem;
}

/* ===== LEFT SIDE - CONTENT AREA ===== */

.hero-content {
    position: relative;
    z-index: 10;
    background: rgba(1, 24, 57, 0.75);
    backdrop-filter: blur(12px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content-tabs {
    position: relative;
    min-height: 400px;
    width: 100%;
    max-width: 100%;
}

.hero-tab-content {
    opacity: 0;
    transform: scale(0.98) translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    position: absolute;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hero-tab-content.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    position: relative;
}

/* ===== HERO TAB BADGES ===== */

.hero-tab-badges {
    position: relative;
    z-index: 15;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.hero-badge {
    position: relative;
    background: linear-gradient(135deg, var(--card-bg), var(--bg-secondary));
    border: 2px solid var(--border-primary);
    border-radius: 20px;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hero-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-primary);
}

.hero-badge:hover::before {
    opacity: 0.15;
}

.hero-badge.active {
    background: var(--gradient-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(245, 128, 78, 0.4);
}

.hero-badge.active::before {
    opacity: 1;
}

.hero-badge.active span {
    color: white;
    font-weight: 700;
}

.hero-badge i {
    font-size: 28px;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hero-badge:hover i {
    transform: scale(1.15) rotate(5deg);
}

.hero-badge.active i {
    color: white;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.hero-badge span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    transition: color 0.3s ease;
}

/* Badge icon colors */
.hero-badge:nth-child(1) i {
    color: var(--strategy-accent);
}

.hero-badge:nth-child(2) i {
    color: var(--platform-accent);
}

.hero-badge:nth-child(3) i {
    color: var(--security-accent);
}

.hero-badge.active:nth-child(1) i,
.hero-badge.active:nth-child(2) i,
.hero-badge.active:nth-child(3) i {
    color: white;
}

/* ===== HERO TYPOGRAPHY ===== */

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    width: 100%;
    margin: 0 0 1.5rem 0;
}

.hero-description {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    width: 100%;
    margin: 0 0 2rem 0;
}

/* ===== HERO STATS ===== */

.hero-stats {
    display: flex;
    gap: 2rem;
    margin: 0 0 2.5rem 0;
    width: 100%;
}

.hero-stat {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-primary);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.hero-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.hero-stat:hover::before {
    transform: scaleX(1);
}

.hero-stat:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

.stat-number {
    display: block;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== HERO ACTIONS ===== */

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-large i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.btn-large:hover i {
    transform: translateX(4px);
}

/* Primary CTA with shine effect */
.btn-primary.btn-large::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: translateX(-100%);
}

.btn-primary.btn-large:hover::after {
    animation: shine 1s ease-in-out;
}

@keyframes shine {
    to {
        transform: translateX(100%);
    }
}

/* ===== RIGHT SIDE - VISUAL TABS ===== */

.hero-visual-tabs {
    position: relative;
    z-index: 10;
}

.hero-visual-content {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    position: absolute;
    width: 100%;
    max-width: 100%;
}

.hero-visual-content.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 500px;
    width: 100%;
    max-width: 100%;
}

/* Ensure inactive visual content is hidden */
.hero-visual-content:not(.active) {
    display: none;
}

/* ===== CODE CONTAINER ===== */

.code-container {
    position: relative;
    z-index: 10;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    width: 100%;
    max-width: 100%;
}

.code-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    background: rgba(30, 41, 59, 0.95);
}

.code-header {
    background: var(--bg-secondary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-primary);
}

.code-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.control:hover {
    transform: scale(1.2);
}

.control.red {
    background: #ff5f56;
}

.control.yellow {
    background: #ffbd2e;
}

.control.green {
    background: #27c93f;
}

.code-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.code-content {
    padding: 24px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.code-content::-webkit-scrollbar {
    width: 8px;
}

.code-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.code-content::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

/* Syntax highlighting */
.code-comment {
    color: #6a737d;
    font-style: italic;
}

.code-key {
    color: var(--strategy-accent);
    font-weight: 600;
}

.code-value {
    color: var(--security-accent);
}

/* ===== FLOATING TECH CARDS - HIDDEN ===== */

.floating-cards {
    display: none;
}

.tech-card {
    display: none;
}

/* ===== SCROLL INDICATOR ===== */

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% {
        top: 8px;
        opacity: 1;
    }
    50% {
        top: 20px;
        opacity: 0.3;
    }
}

.scroll-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ===== LIGHT THEME ADJUSTMENTS ===== */

[data-theme="light"] .hero::before {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.6) 100%
    );
}

[data-theme="light"] .hero-content {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .hero-content .hero-title,
[data-theme="light"] .hero-content .hero-description,
[data-theme="light"] .hero-content .stat-label {
    color: var(--text-primary);
}

[data-theme="light"] .stat-number {
    color: var(--accent-primary);
}

[data-theme="light"] .hero-badge {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    border-color: var(--border-primary);
}

[data-theme="light"] .hero-badge:hover {
    border-color: var(--accent-primary);
}

/* ===== DARK THEME ADJUSTMENTS ===== */

[data-theme="dark"] .hero::before {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.6) 0%,
        rgba(15, 23, 42, 0.5) 50%,
        rgba(15, 23, 42, 0.6) 100%
    );
}

[data-theme="dark"] .hero-content {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .stat-number {
    color: var(--accent-primary);
}

[data-theme="dark"] .code-container {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .code-header {
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="dark"] .hero-stat,
[data-theme="dark"] .hero-badge {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.6));
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hero-badge:hover {
    border-color: var(--accent-primary);
}

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

/* Tablet - Adjust grid */
@media (max-width: 1200px) {
    .hero-split {
        gap: 3rem;
    }
}

@media (max-width: 1024px) {
    .hero-split {
        gap: 2rem;
    }

    .hero-content {
        padding: 2.5rem;
    }
}

/* Mobile - Stack vertically */
@media (max-width: 968px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-visual-tabs {
        order: -1; /* Move visual content above text on mobile */
    }

    .hero-tab-badges {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 5rem 0 3rem;
        min-height: auto;
    }

    .hero::before {
        background: linear-gradient(
            135deg,
            rgba(1, 24, 57, 0.7) 0%,
            rgba(1, 24, 57, 0.6) 50%,
            rgba(1, 24, 57, 0.7) 100%
        );
    }

    .hero-content {
        padding: 2rem;
        background: rgba(1, 24, 57, 0.9);
    }

    .hero-tab-badges {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 1.5rem;
    }

    .hero-badge {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 20px;
    }

    .hero-badge span {
        font-size: 0.95rem;
    }

    .hero-badge i {
        font-size: 24px;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-stat {
        padding: 1.5rem 1rem;
    }

    .stat-number {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-large {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .code-container {
        font-size: 12px;
        max-width: 100%;
        background: rgba(30, 41, 59, 0.95);
    }

    .scroll-indicator {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        padding: 12px 16px;
    }

    .hero-badge span {
        font-size: 0.9rem;
    }

    .hero-badge i {
        font-size: 20px;
    }
}

/* ===== ACCESSIBILITY ===== */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero-badge,
    .hero-stat,
    .code-container,
    .hero-tab-content,
    .hero-visual-content {
        transition: none;
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .code-container,
    .hero-badge,
    .hero-stat {
        border: 2px solid var(--text-primary);
    }
}

/* ===== PRINT STYLES ===== */

@media print {
    .hero {
        background-image: none;
        min-height: auto;
    }

    .hero::before {
        display: none;
    }

    .code-container,
    .hero-badge,
    .hero-stat {
        box-shadow: none;
        border: 1px solid #000;
    }

    .scroll-indicator {
        display: none;
    }
}
