/* ===== MICROSOFT TECHNOLOGIES SECTION ===== */

.compact-tech-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem 0 1.5rem 0;
    position: relative;
    overflow: hidden;
    min-height: 350px;
}

/* ===== ANIMATED BACKGROUND SHAPES ===== */
.tech-background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

/* Floating Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    animation: floatShape 15s ease-in-out infinite;
}

.shape-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 8%;
    animation-delay: 0s;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.shape-2 {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 15%;
    animation-delay: -5s;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    left: 20%;
    animation-delay: -10s;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.06) 0%, rgba(219, 39, 119, 0.06) 100%);
}

.shape-4 {
    width: 90px;
    height: 90px;
    bottom: 25%;
    right: 10%;
    animation-delay: -7s;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
}

.shape-5 {
    width: 110px;
    height: 110px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -12s;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.08) 100%);
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
        opacity: 0.8;
    }
}

/* Floating Dots */
.floating-dots {
    position: absolute;
    width: 100%;
    height: 100%;
}

.dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(74, 144, 226, 0.4);
    border-radius: 50%;
    animation: floatDot 12s ease-in-out infinite;
}

.dot-1 {
    top: 15%;
    left: 25%;
    animation-delay: -1s;
}

.dot-2 {
    top: 30%;
    right: 20%;
    animation-delay: -3s;
}

.dot-3 {
    bottom: 20%;
    left: 30%;
    animation-delay: -5s;
}

.dot-4 {
    bottom: 35%;
    right: 25%;
    animation-delay: -7s;
}

.dot-5 {
    top: 60%;
    left: 70%;
    animation-delay: -9s;
}

.dot-6 {
    top: 80%;
    left: 15%;
    animation-delay: -11s;
}

@keyframes floatDot {
    0%, 100% {
        transform: translateY(0px);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px);
        opacity: 0.8;
    }
}

/* Section Title */
.tech-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.tech-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

/* Technology Grid - BALANCED 4x2 LAYOUT */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem 0;
    position: relative;
    z-index: 2;
}

/* Individual Tech Items - COMPACT & UNIFORM SIZE */
.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(74, 144, 226, 0.08);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    height: 140px; /* UNIFORM HEIGHT */
    width: 100%;
    justify-self: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tech-item:hover {
    transform: translateY(-8px) scale(1.03);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(74, 144, 226, 0.2);
    box-shadow: 
        0 15px 35px rgba(74, 144, 226, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Technology Icons - OPTIMIZED */
.tech-item img {
    width: 42px;
    height: 42px;
    margin-bottom: 0.8rem;
    filter: brightness(1.05) saturate(1.1);
    transition: all 0.3s ease;
}

.tech-item:hover img {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.15) saturate(1.3);
}

/* Technology Names - BIGGER TEXT */
.tech-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
    text-align: center;
}

.tech-item:hover span {
    color: #1f2937;
}

/* Dark Mode Support */
[data-bs-theme="dark"] .compact-tech-section {
    background: #1e293b;
}

[data-bs-theme="dark"] .tech-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .tech-subtitle {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .tech-item {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.1);
}

[data-bs-theme="dark"] .tech-item:hover {
    background: rgba(30, 41, 59, 1);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .tech-item span {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .tech-item:hover span {
    color: #f1f5f9;
}

/* Responsive Design - BALANCED LAYOUT */
@media (max-width: 992px) {
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.2rem;
    }
    
    .tech-item {
        height: 130px; /* UNIFORM HEIGHT */
        padding: 1.3rem 0.8rem;
    }
    
    .tech-item img {
        width: 38px;
        height: 38px;
    }
    
    .tech-item span {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .compact-tech-section {
        padding: 2rem 0 1.5rem 0;
        min-height: 320px;
    }
    
    .tech-title {
        font-size: 1.8rem;
    }
    
    .tech-subtitle {
        font-size: 0.95rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 1rem;
        padding: 1.5rem 0;
    }
    
    .tech-item {
        height: 120px; /* UNIFORM HEIGHT */
        padding: 1.2rem 0.8rem;
    }
    
    .tech-item img {
        width: 36px;
        height: 36px;
        margin-bottom: 0.7rem;
    }
    
    .tech-item span {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .compact-tech-section {
        min-height: 280px;
        padding: 1.5rem 0 1rem 0;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 0.8rem;
        padding: 1rem 0;
    }
    
    .tech-item {
        height: 110px; /* UNIFORM HEIGHT */
        padding: 1rem 0.6rem;
    }
    
    .tech-item img {
        width: 32px;
        height: 32px;
    }
    
    .tech-item span {
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 0.8rem;
    }
    
    .tech-item {
        height: 120px; /* UNIFORM HEIGHT */
        max-width: 130px;
        padding: 1rem 0.7rem;
    }
    
    .tech-item img {
        width: 32px;
        height: 32px;
        margin-bottom: 0.7rem;
    }
    
    .tech-item span {
        font-size: 0.7rem;
        line-height: 1.2;
    }
}

/* Animation Enhancements */
.tech-item[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(15px);
}

.tech-item[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Performance Optimizations */
.tech-item {
    will-change: transform, box-shadow;
}

.tech-item img {
    will-change: transform, filter;
}

/* Print Styles */
@media print {
    .compact-tech-section {
        background: white;
        padding: 1rem 0;
    }
    
    .tech-item {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .tech-grid {
        gap: 0.5rem;
    }
}
