/**
 * SML Technology Feature Widget CSS
 * ══════════════════════════════════════════════════════════════
 * Aesthetic: Laboratory Elegance with Scientific Precision
 * 
 * - Floating cards with depth
 * - Animated icon backgrounds
 * - Gradient accents & subtle patterns
 * ══════════════════════════════════════════════════════════════
 */

/* ============================================
   Section Container
   ============================================ */
.sml-tech-section {
    --sml-primary: #0A2540;
    --sml-secondary: #00C9A7;
    --sml-accent: #00D4FF;
    --sml-bg-white: #FFFFFF;
    --sml-bg-gray: #F8FAFB;
    --sml-bg-cream: #FAFDF9;
    --sml-border: #E2E8F0;
    --sml-text: #1A1A2E;
    --sml-text-muted: #64748B;
    --sml-feature-color: var(--tech-color, #00C9A7);
    
    position: relative;
    padding: 100px 24px;
    background: linear-gradient(180deg, var(--sml-bg-cream) 0%, var(--sml-bg-white) 50%, var(--sml-bg-gray) 100%);
    overflow: hidden;
}

/* Subtle Background Pattern */
.sml-tech-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(ellipse 100% 60% at 0% 0%, rgba(0, 201, 167, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 100% 100%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 1px 1px, rgba(0, 201, 167, 0.04) 1px, transparent 0);
    background-size: 100% 100%, 100% 100%, 32px 32px;
    pointer-events: none;
}

/* Floating Decoration */
.sml-tech-section::after {
    content: '';
    position: absolute;
    top: 10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 201, 167, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: sml-float-gentle 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sml-float-gentle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(1.05); }
}

/* ============================================
   Header
   ============================================ */
.sml-tech-header {
    text-align: center;
    margin-bottom: 72px;
    position: relative;
    z-index: 2;
}

.sml-tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.12) 0%, rgba(0, 212, 255, 0.12) 100%);
    border: 1px solid rgba(0, 201, 167, 0.2);
    border-radius: 50px;
    margin-bottom: 24px;
    font-family: var(--sml-font-mono, 'JetBrains Mono', monospace);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sml-secondary);
}

.sml-tech-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--sml-secondary);
    border-radius: 50%;
    animation: sml-pulse-dot 2s ease-in-out infinite;
}

@keyframes sml-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.sml-tech-title {
    font-family: var(--sml-font-display, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: var(--sml-primary);
    margin: 0 0 20px 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.sml-tech-title span {
    background: linear-gradient(135deg, var(--sml-secondary) 0%, var(--sml-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sml-tech-subtitle {
    font-family: var(--sml-font-body, 'DM Sans', sans-serif);
    font-size: 18px;
    color: var(--sml-text-muted);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   Grid Layout
   ============================================ */
.sml-tech-grid {
    display: grid;
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.sml-tech-grid.columns-1 { 
    grid-template-columns: 1fr; 
    max-width: 680px; 
}

.sml-tech-grid.columns-2 { 
    grid-template-columns: repeat(2, 1fr); 
}

.sml-tech-grid.columns-3 { 
    grid-template-columns: repeat(3, 1fr); 
}

.sml-tech-grid.columns-4 { 
    grid-template-columns: repeat(4, 1fr); 
}

/* ============================================
   Card Styles - Elevated Glass Effect
   ============================================ */
.sml-tech-card {
    background: var(--sml-bg-white);
    border-radius: 20px;
    padding: 36px 32px;
    border: 1px solid rgba(0, 201, 167, 0.1);
    box-shadow: 
        0 4px 6px rgba(10, 37, 64, 0.02),
        0 12px 24px rgba(10, 37, 64, 0.04);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Top Gradient Line - Always Visible */
.sml-tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--sml-feature-color) 0%, 
        var(--sml-accent) 50%, 
        var(--sml-feature-color) 100%);
    background-size: 200% 100%;
    animation: sml-gradient-shift 3s ease infinite;
    opacity: 0.7;
}

@keyframes sml-gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* Hover Glow Effect */
.sml-tech-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 201, 167, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.sml-tech-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 201, 167, 0.3);
    box-shadow: 
        0 8px 16px rgba(10, 37, 64, 0.04),
        0 24px 48px rgba(0, 201, 167, 0.12);
}

.sml-tech-card:hover::before {
    opacity: 1;
}

.sml-tech-card:hover::after {
    opacity: 1;
}

/* ============================================
   Icon Styles - Animated Background
   ============================================ */
.sml-tech-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--sml-feature-color);
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.sml-tech-icon svg,
.sml-tech-icon i {
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.sml-tech-card:hover .sml-tech-icon svg,
.sml-tech-card:hover .sml-tech-icon i {
    transform: scale(1.1);
}

/* Circle Icon Style */
.sml-tech-icon-circle .sml-tech-icon {
    background: linear-gradient(135deg, 
        rgba(0, 201, 167, 0.12) 0%, 
        rgba(0, 212, 255, 0.08) 100%);
    border-radius: 50%;
    border: 2px solid rgba(0, 201, 167, 0.15);
}

.sml-tech-icon-circle .sml-tech-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 201, 167, 0.2);
    animation: sml-rotate-slow 20s linear infinite;
}

@keyframes sml-rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Square Icon Style */
.sml-tech-icon-square .sml-tech-icon {
    background: linear-gradient(135deg, 
        rgba(0, 201, 167, 0.12) 0%, 
        rgba(0, 212, 255, 0.08) 100%);
    border-radius: 16px;
    border: 2px solid rgba(0, 201, 167, 0.15);
}

.sml-tech-icon img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

/* ============================================
   Card Content
   ============================================ */
.sml-tech-card-title {
    font-family: var(--sml-font-display, 'Plus Jakarta Sans', sans-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--sml-primary);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.sml-tech-card-desc {
    font-family: var(--sml-font-body, 'DM Sans', sans-serif);
    font-size: 15px;
    color: var(--sml-text-muted);
    line-height: 1.75;
    margin-bottom: 20px;
}

/* ============================================
   Feature List - Enhanced
   ============================================ */
.sml-tech-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.sml-tech-features li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-family: var(--sml-font-body, 'DM Sans', sans-serif);
    font-size: 14px;
    color: var(--sml-text);
    line-height: 1.6;
}

.sml-tech-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--sml-feature-color), var(--sml-accent));
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 201, 167, 0.4);
}

/* ============================================
   Link Style - Arrow Animation
   ============================================ */
.sml-tech-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sml-font-display, 'Plus Jakarta Sans', sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--sml-feature-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 8px 0;
}

.sml-tech-link::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sml-tech-link:hover {
    color: var(--sml-accent);
}

.sml-tech-link:hover::after {
    transform: translateX(6px);
}

.sml-tech-link svg {
    transition: transform 0.3s ease;
}

.sml-tech-link:hover svg {
    transform: translateX(4px);
}

/* ============================================
   Alternating Layout - Large Feature Sections
   ============================================ */
.sml-tech-alternating {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.sml-tech-alternating .sml-tech-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 80px 0;
    border-bottom: 1px solid rgba(0, 201, 167, 0.1);
}

.sml-tech-alternating .sml-tech-item:last-child {
    border-bottom: none;
}

.sml-tech-alternating .sml-tech-item:nth-child(even) {
    direction: rtl;
}

.sml-tech-alternating .sml-tech-item:nth-child(even) > * {
    direction: ltr;
}

.sml-tech-alternating .sml-tech-content {
    padding: 24px 0;
}

.sml-tech-alternating .sml-tech-content .sml-tech-badge {
    justify-content: flex-start;
}

.sml-tech-alternating .sml-tech-content .sml-tech-card-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.sml-tech-alternating .sml-tech-content .sml-tech-card-desc {
    font-size: 17px;
    margin-bottom: 28px;
}

.sml-tech-alternating .sml-tech-image {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(10, 37, 64, 0.08),
        0 40px 80px rgba(0, 201, 167, 0.1);
    position: relative;
}

.sml-tech-alternating .sml-tech-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0, 201, 167, 0.2);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}

.sml-tech-alternating .sml-tech-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sml-tech-alternating .sml-tech-item:hover .sml-tech-image img {
    transform: scale(1.03);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .sml-tech-grid.columns-3,
    .sml-tech-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sml-tech-alternating .sml-tech-item {
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .sml-tech-section {
        padding: 72px 20px;
    }

    .sml-tech-header {
        margin-bottom: 48px;
    }

    .sml-tech-grid.columns-2,
    .sml-tech-grid.columns-3,
    .sml-tech-grid.columns-4 {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .sml-tech-card {
        padding: 28px 24px;
    }

    .sml-tech-alternating .sml-tech-item {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 48px 0;
    }

    .sml-tech-alternating .sml-tech-item:nth-child(even) {
        direction: ltr;
    }

    .sml-tech-alternating .sml-tech-content .sml-tech-card-title {
        font-size: 26px;
    }
}
