/* ========================================
   Tiles Grid - Modern Dark Theme
   ======================================== */

.tiles-section {
    padding: var(--section-padding) 0;
    background: var(--color-bg-primary);
}

.tiles-section .section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem);
}

.tile {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tile::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--color-accent-gradient);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
    filter: blur(8px);
}

.tile:hover {
    border-color: var(--color-accent-blue);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(10, 173, 191, 0.2);
}

.tile:hover::after {
    opacity: 0.5;
}

.tile-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.tile-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-accent-gradient);
    opacity: 0;
    z-index: 2;
    transition: opacity 0.4s ease;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.tile:hover .tile-image::before {
    opacity: 0.25;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.4s ease;
    filter: brightness(0.92) saturate(1);
    transform: scale(1.1); /* Für Parallax */
}

.tile:hover img {
    filter: brightness(1.05) saturate(1.1);
}

.tile-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 13, 20, 0.8) 100%);
    pointer-events: none;
}

.tile-content {
    padding: 1.5rem;
}

.tile h3 {
    font-size: 1.35rem;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.tile p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Icon variant */
.tile-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    padding: 12px;
    background: var(--color-accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Alternative: Compact tiles without image */
.tile.tile--compact {
    padding: 2rem;
}

.tile.tile--compact .tile-content {
    padding: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .tiles-section {
        padding: clamp(3rem, 8vw, 5rem) 0;
    }

    .tiles-section .section-title {
        margin-bottom: 2rem;
    }

    .tiles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1.25rem;
    }
}

@media (max-width: 600px) {
    .tiles-section {
        padding: clamp(2rem, 6vw, 3rem) 0;
    }

    .tiles-grid {
        gap: 1.25rem;
        padding: 0 1rem;
    }

    .tile {
        border-radius: 16px;
    }

    .tile-image {
        aspect-ratio: 16 / 10;
    }

    .tile-content {
        padding: 1.25rem;
    }

    .tile h3 {
        font-size: 1.15rem;
        margin-bottom: 0.5rem;
    }

    .tile p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .section-title h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
}

/* Touch-Feedback für Tiles */
@media (hover: none) and (pointer: coarse) {
    .tile:hover {
        transform: none;
        box-shadow: var(--shadow-lg);
    }

    .tile:active {
        transform: scale(0.98);
        transition: transform 0.15s ease;
    }

    .tile:hover img {
        transform: none;
    }

    .tile:hover .tile-image::before {
        opacity: 0;
    }
}

/* Spacer */
.spacer {
    height: 2rem;
}

@media (max-width: 900px) {
    .spacer {
        height: 1rem;
    }
}
