/* ============================================
   SapCod - Tech Hero Section
   FULLY MOBILE OPTIMIZED
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== Section Container ===== */
.sapcod-hero-tech {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    overflow: hidden;
    isolation: isolate;
    font-family: 'Inter', sans-serif;
}

[data-theme="dark"] .sapcod-hero-tech {
    background: #0a0a0f;
}

/* ===== Background (Simplified for mobile) ===== */
.hero-tech-circuit {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 100h40l10-20h30l10 40h30l10-30h30l10 50h40' stroke='%230066ff' stroke-width='1.5' fill='none'/%3E%3Ccircle cx='40' cy='100' r='3' fill='%230066ff'/%3E%3Ccircle cx='80' cy='80' r='3' fill='%23339966'/%3E%3Ccircle cx='120' cy='120' r='3' fill='%238b5cf6'/%3E%3Ccircle cx='160' cy='90' r='3' fill='%230066ff'/%3E%3C/svg%3E");
    background-size: 150px 150px;
    pointer-events: none;
}

.hero-tech-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.05;
}

.hero-tech-orb.o1 {
    width: 250px;
    height: 250px;
    background: #0066ff;
    top: -80px;
    right: -60px;
}

.hero-tech-orb.o2 {
    width: 200px;
    height: 200px;
    background: #339966;
    bottom: -60px;
    left: -50px;
}

/* ===== Container ===== */
.sapcod-hero-tech .hero-tech-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ===== Main Grid ===== */
.hero-tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
    padding: 80px 0 60px;
}

.hero-tech-content {
    order: 1;
}

.hero-tech-visual {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ===== Status Badge ===== */
.hero-tech-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

[data-theme="dark"] .hero-tech-status {
    background: rgba(0,102,255,0.1);
    border-color: rgba(0,102,255,0.2);
}

.hero-tech-status .status-light {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
}

.hero-tech-status span {
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

[data-theme="dark"] .hero-tech-status span {
    color: #60a5fa;
}

/* ===== Heading ===== */
.hero-tech-heading {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.15;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

[data-theme="dark"] .hero-tech-heading {
    color: #f1f5f9;
}

.hero-tech-heading .highlight-blue {
    color: #0066ff;
    position: relative;
}

.hero-tech-heading .highlight-blue::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0,102,255,0.12);
    border-radius: 2px;
    z-index: -1;
}

.hero-tech-heading .highlight-green {
    color: #339966;
}

.hero-tech-heading .highlight-purple {
    color: #8b5cf6;
}

/* ===== Code Line ===== */
.hero-tech-code-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.65rem, 1.5vw, 0.85rem);
}

.hero-tech-code-line .code-bracket {
    color: #f59e0b;
}

.hero-tech-code-line .code-text {
    color: #64748b;
}

[data-theme="dark"] .hero-tech-code-line .code-text {
    color: #94a3b8;
}

.hero-tech-code-line .code-highlight {
    color: #0066ff;
    font-weight: 600;
}

.hero-tech-code-line .code-string {
    color: #339966;
}

/* ===== Description ===== */
.hero-tech-desc {
    font-size: clamp(0.85rem, 1.8vw, 1.05rem);
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 500px;
}

[data-theme="dark"] .hero-tech-desc {
    color: #94a3b8;
}

/* ===== CTA Buttons ===== */
.hero-tech-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-tech-primary {
    padding: 12px 24px;
    background: #0066ff;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,102,255,0.2);
    white-space: nowrap;
}

.btn-tech-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,102,255,0.3);
}

.btn-tech-outline {
    padding: 12px 24px;
    background: #fff;
    color: #0066ff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    white-space: nowrap;
}

[data-theme="dark"] .btn-tech-outline {
    background: transparent;
    color: #60a5fa;
    border-color: rgba(59,130,246,0.3);
}

.btn-tech-outline:hover {
    border-color: #0066ff;
    transform: translateY(-2px);
}

/* ===== Terminal ===== */
.hero-tech-terminal {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

[data-theme="dark"] .hero-tech-terminal {
    background: #0f172a;
    border-color: rgba(59,130,246,0.2);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.terminal-header {
    background: #f1f5f9;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="dark"] .terminal-header {
    background: #1e293b;
    border-bottom-color: rgba(255,255,255,0.05);
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #22c55e; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.65rem;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.terminal-body {
    padding: 16px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.6rem, 1.5vw, 0.78rem);
    line-height: 1.7;
    color: #64748b;
    min-height: 200px;
    max-height: 350px;
}

[data-theme="dark"] .terminal-body {
    color: #94a3b8;
}

.terminal-line {
    display: flex;
    gap: 6px;
}

.terminal-prompt {
    color: #339966;
    font-weight: 600;
    flex-shrink: 0;
}

.terminal-cursor {
    display: inline-block;
    width: 6px;
    height: 14px;
    background: #0066ff;
    animation: cursorBlink 1s infinite;
    vertical-align: middle;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== Floating Cards ===== */
.hero-tech-float-card {
    position: absolute;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

[data-theme="dark"] .hero-tech-float-card {
    background: #1a1a2e;
    border-color: rgba(59,130,246,0.2);
}

.hero-tech-float-card.fc-1 {
    top: -10px;
    right: -10px;
}

.hero-tech-float-card.fc-2 {
    bottom: -10px;
    left: -10px;
}

.fc-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.fc-icon.fci-blue {
    background: rgba(0,102,255,0.1);
    color: #0066ff;
}

.fc-icon.fci-green {
    background: rgba(51,153,102,0.1);
    color: #339966;
}

.fc-info .fc-val {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
}

[data-theme="dark"] .fc-info .fc-val {
    color: #f1f5f9;
}

.fc-info .fc-lbl {
    font-size: 0.58rem;
    color: #94a3b8;
}

/* ============================================ */
/*           MOBILE RESPONSIVE                   */
/* ============================================ */

@media (max-width: 1024px) {
    .hero-tech-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
        padding: 70px 0 40px;
    }
    
    .hero-tech-content {
        order: 1 !important;
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
    
    .hero-tech-visual {
        order: 2 !important;
        max-width: 350px;
        margin: 0 auto;
        width: 100%;
    }
    
    .hero-tech-desc {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-tech-code-line {
        justify-content: center;
    }
    
    .hero-tech-cta {
        justify-content: center;
    }
    
    .hero-tech-float-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .sapcod-hero-tech .hero-tech-container {
        padding: 0 14px;
    }
    
    .hero-tech-grid {
        padding: 65px 0 35px;
        gap: 25px;
    }
    
    .hero-tech-heading {
        margin-bottom: 10px;
    }
    
    .hero-tech-desc {
        margin-bottom: 16px;
    }
    
    .hero-tech-cta {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-tech-primary,
    .btn-tech-outline {
        width: 100%;
        justify-content: center;
        padding: 13px 20px;
    }
    
    .terminal-body {
        min-height: 160px;
    }
}

@media (max-width: 480px) {
    .sapcod-hero-tech .hero-tech-container {
        padding: 0 10px;
    }
    
    .hero-tech-grid {
        padding: 60px 0 30px;
        gap: 20px;
    }
    
    .hero-tech-content {
        padding: 0;
    }
    
    .hero-tech-visual {
        max-width: 300px;
        padding: 0;
    }
    
    .hero-tech-heading {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .hero-tech-desc {
        font-size: 0.82rem;
        line-height: 1.5;
        padding: 0 5px;
    }
    
    .hero-tech-code-line {
        font-size: 0.6rem;
    }
    
    .hero-tech-status span {
        font-size: 0.6rem;
    }
    
    .btn-tech-primary,
    .btn-tech-outline {
        padding: 11px 16px;
        font-size: 0.82rem;
        border-radius: 8px;
    }
    
    .terminal-body {
        min-height: 140px;
        padding: 12px 10px;
        font-size: 0.58rem;
    }
    
    .terminal-header {
        padding: 8px 10px;
    }
    
    .terminal-title {
        font-size: 0.55rem;
    }
}

@media (max-width: 360px) {
    .hero-tech-grid {
        padding: 55px 0 25px;
        gap: 15px;
    }
    
    .hero-tech-heading {
        font-size: 1.3rem;
    }
    
    .hero-tech-desc {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
    
    .hero-tech-code-line {
        font-size: 0.55rem;
    }
    
    .hero-tech-visual {
        max-width: 260px;
    }
    
    .terminal-body {
        min-height: 120px;
        font-size: 0.52rem;
        padding: 10px 8px;
    }
    
    .btn-tech-primary,
    .btn-tech-outline {
        padding: 10px 14px;
        font-size: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-tech-circuit,
    .data-stream,
    .hero-tech-orb,
    .hero-tech-terminal,
    .hero-tech-float-card,
    .hero-tech-status .status-light,
    .terminal-cursor {
        animation: none;
    }
}