/* --- Features Grid Section (Light Mode) --- */
.feat-section {
    background-color: #ffffff;
    padding: 120px 0; 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #0f172a;
    position: relative;
    overflow: hidden;
}

/* Premium Divider */
.feat-section::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.05) 20%, rgba(59, 130, 246, 0.5) 50%, rgba(0, 0, 0, 0.05) 80%, transparent 100%);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.feat-container {
    max-width: 1100px; 
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Technical Header --- */
.feat-header {
    display: flex;
    align-items: center;
    gap: 32px; 
    margin-bottom: 60px; /* Reduced slightly to make room for tabs */
    width: 100%;
}

.feat-headline {
    font-size: 28px; 
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.feat-separator {
    flex-grow: 1; 
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 100%); 
}

.feat-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.feat-tag {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    background: #f8fafc;
}

.feat-intro {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

/* --- NEW: Tab Navigation --- */
.feat-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 35px;
    flex-wrap: wrap;
    margin-top: -2.8em;
}

.feat-tab-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.feat-tab-btn:hover {
    border-color: #cbd5e1;
    color: #0f172a;
    background: #f8fafc;
}

.feat-tab-btn.active {
    background: #0f172a; /* Active is Dark */
    color: #ffffff;
    border-color: #0f172a;
}

/* --- Content Wrapper --- */
.feat-content-wrapper {
    min-height: 400px;
}

/* --- 3-Column Grid --- */
.feat-grid {
    display: none; /* Hidden by default */
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 40px; 
    animation: fadeGrid 0.4s ease forwards;
}

.feat-grid.active {
    display: grid;
}

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

/* Individual Item */
.feat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px; /* Slightly tighter gap */
}

/* NEW: Small Media Wrapper (Replaces Icon) */
.feat-media-small {
    width: 100%;
    /* This height keeps it looking like a thumbnail, not a hero image */
    height: 140px; 
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    margin-bottom: 4px;
}

.feat-media-small video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feat-title {
    font-size: 16px; 
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.feat-desc {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
    max-width: 100%;
    letter-spacing: 0.01em;
    margin-top: -.7em;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .feat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .feat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 40px;
    }
    .feat-separator { width: 100%; flex-grow: 0; }
    .feat-meta { width: 100%; justify-content: space-between; }
    .feat-grid { grid-template-columns: 1fr; gap: 40px; }
    .feat-media-small { height: 180px; } /* Slightly larger video on mobile */
}

/* --- Header Group Container --- */
.feat-header-group {
    display: flex;
    flex-direction: column;
    gap: 24px; /* Space between the top row and the box */
    margin-bottom: 80px;
    width: 100%;
}

/* --- Row 1: The Horizontal Layout --- */
.feat-header-primary {
    display: flex;
    align-items: center;
    gap: 32px;
    width: 100%;
}

.feat-headline {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.03em;
    white-space: nowrap; /* Prevents wrapping */
}

.feat-separator {
    flex-grow: 1; /* Stretches to fill space */
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 100%);
}

.feat-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap; /* Prevents wrapping */
}

/* --- Row 2: The Context Box --- */
.feat-context-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    max-width: 600px; /* Limits width for readability */
}

.feat-context-box strong { color: #0f172a; font-weight: 600; }
.feat-context-box em { font-style: normal; color: #3b82f6; font-weight: 600; }
.feat-context-box p { margin: 0; }

.feat-context-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #e0f2fe;
    color: #0284c7;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    font-family: serif;
    flex-shrink: 0;
}

/* --- Responsive Layout --- */
@media (max-width: 768px) {
    .feat-header-primary {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .feat-separator {
        width: 100%;
        flex-grow: 0;
    }
    
    .feat-meta {
        width: 100%;
        justify-content: space-between;
    }
    
    .feat-context-box {
        max-width: 100%;
    }
}