/* =============================================
   Tech Tiles — 1:1 z oryginalnego kodu Bobby'ego
   Kafelki technologii z hover expand + stats bar
   ============================================= */

/* --- GRID --- */
.tech-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: start;
    margin-bottom: 80px;
}

/* --- CARD --- */
.tech-tile {
    background-color: var(--bg-card, #161b22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.4s ease,
                border-color 0.4s ease,
                box-shadow 0.4s ease;
    z-index: 1;
    will-change: transform, height;
}

.tech-tile:hover {
    transform: translateY(-8px);
    background-color: var(--bg-card-hover, #1c2128);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* --- ICON AREA --- */
.tech-tile-icon {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 -20px 40px -10px rgba(0, 0, 0, 0.6);
}

.tech-tile:hover .tech-tile-icon {
    height: 100px;
}

.tech-tile-icon i {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tech-tile:hover .tech-tile-icon i {
    transform: scale(0.8) translateY(-5px);
}

/* --- CONTENT --- */
.tech-tile-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tech-tile-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-primary, #ffffff);
    transition: transform 0.4s ease;
}

.tech-tile-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary, #8b949e);
    margin: 0;
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-tile:hover .tech-tile-content p {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 12px;
    margin-bottom: 20px;
}

/* --- BADGE --- */
.tech-tile-badge {
    position: absolute;
    top: -20px;
    right: 20px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 5;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tech-tile:hover .tech-tile-badge {
    transform: translateY(-5px) scale(1.05);
}

.tech-tile .tech-tile-badge.security    { background: #7f1d1d !important; color: #fca5a5 !important; border: 1px solid #f87171 !important; }
.tech-tile .tech-tile-badge.performance { background: #14532d !important; color: #86efac !important; border: 1px solid #4ade80 !important; }
.tech-tile .tech-tile-badge.enterprise  { background: #4c1d95 !important; color: #c4b5fd !important; border: 1px solid #a78bfa !important; }
.tech-tile .tech-tile-badge.stability   { background: #164e63 !important; color: #67e8f9 !important; border: 1px solid #22d3ee !important; }
.tech-tile .tech-tile-badge.modern      { background: #701a75 !important; color: #f0abfc !important; border: 1px solid #e879f9 !important; }
.tech-tile .tech-tile-badge.reliability { background: #1e3a8a !important; color: #93c5fd !important; border: 1px solid #60a5fa !important; }
.tech-tile .tech-tile-badge.advanced    { background: #134e4a !important; color: #5eead4 !important; border: 1px solid #2dd4bf !important; }
.tech-tile .tech-tile-badge.flexible    { background: #064e3b !important; color: #6ee7b7 !important; border: 1px solid #34d399 !important; }

/* --- STATS BAR (previous version, Bobby-approved) --- */
.tech-numbers {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-lg, 24px);
    margin-top: var(--spacing-xl, 48px);
    margin-bottom: var(--spacing-xl, 48px);
    background-color: var(--primary-color, #0056b3);
    border-radius: var(--border-radius-lg, 16px);
    padding: var(--spacing-xl, 48px) var(--spacing-lg, 24px);
    color: white;
    box-shadow: var(--shadow-lg, 0 25px 50px -12px rgba(0, 0, 0, 0.25));
}

.tech-number-item {
    flex: 1;
    min-width: 160px;
    text-align: center;
    padding: var(--spacing-md, 16px);
    transition: transform 0.3s ease;
}

.tech-number-item:hover {
    transform: translateY(-5px);
}

.tech-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm, 8px);
    background: linear-gradient(to right, #ffffff, #e6e6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.tech-number-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* --- LIGHT MODE OVERRIDES --- */
body:not(.dark-mode) .tech-tile {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .tech-tile:hover {
    background-color: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

body:not(.dark-mode) .tech-tile-content h3 {
    color: #0f172a;
}

body:not(.dark-mode) .tech-tile-content p {
    color: #64748b;
}

/* --- DARK MODE (explicit) --- */
body.dark-mode .tech-tile {
    background-color: #161b22;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .tech-tile:hover {
    background-color: #1c2128;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .tech-tile-content h3 {
    color: #ffffff;
}

body.dark-mode .tech-tile-content p {
    color: #8b949e;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .tech-numbers {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        padding: 40px 30px;
    }
}

@media (max-width: 600px) {
    .tech-tiles-grid {
        grid-template-columns: 1fr;
    }

    .tech-tile-icon {
        height: 100px;
    }

    .tech-numbers {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tech-number {
        font-size: 3rem;
    }
}
