@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

body { 
    font-family: 'Inter', sans-serif; 
    overflow-x: hidden; 
}

/* Hero Section Shape */
.hero-clip {
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0% 100%);
}

@media (min-width: 768px) {
    .hero-clip {
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
    }
}

/* Category Hover Effects */
.category-hover:hover .icon-box {
    background-color: #e11d48;
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* Primary Button Styling */
.btn-primary {
    background-color: #e11d48;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #9f1239;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(225, 29, 72, 0.4);
}

/* Section Title Decoration */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50px;
    height: 4px;
    background-color: #e11d48;
}

/* Navigation Blur Effect */
.glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Smooth Transitions */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Overlay specific styles for 3D Tlač card */
.overlay-panel {
    border-radius: 1.5rem;
}
.overlay-panel h4 {
    letter-spacing: 0.04em;
}
.overlay-materials {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.overlay-materials .chip {
    background: rgba(255,255,255,0.06);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 11px;
}
.overlay-img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    transition: transform 0.35s ease;
}
.overlay-img:hover { transform: translateY(-4px) scale(1.02); }

/* Make overlay text more readable on small cards */
@media (max-width: 640px) {
    .overlay-panel { padding: 1rem; }
    .overlay-img { height: 56px; }
}

/* Enhanced overlay behavior */
.category-hover { position: relative; }
.overlay-panel {
    box-shadow: 0 30px 60px rgba(2,6,23,0.25);
    backdrop-filter: blur(6px);
    /* hidden by default; shown on hover or when .visible is added */
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    z-index: 30;
    /* stronger, consistent dark background for contrast */
    background-color: rgba(0,0,0,0.88) !important;
    color: #ffffff;
}
.overlay-panel .overlay-img { height: 72px; }

.overlay-panel h4 { color: #ffffff; font-size: 1rem; }
.overlay-panel p, .overlay-panel .overlay-text { color: rgba(255,255,255,0.95); font-size: 0.95rem; line-height: 1.3; }
.overlay-materials .chip { background: rgba(255,255,255,0.12); color: #fff; }
.overlay-panel a { color: #fff; }

/* When overlay is open (hover or clicked) */
.category-hover .overlay-panel {
    transition: opacity 0.32s ease, transform 0.32s ease;
}
.category-hover .overlay-panel, .category-hover .overlay-panel * { will-change: opacity, transform; }
.category-hover .overlay-panel.visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* On small screens show overlay as full-card panel stacked */
@media (max-width: 768px) {
    .overlay-panel { position: absolute; inset: 0; border-radius: 1.5rem; padding: 1rem; }
}

/* Ensure anchors are visible by default and transition cleanly */
.category-hover a { opacity: 1; transition: opacity 0.2s ease; }

/* Show overlay on hover (mouse) */
.category-hover:hover .overlay-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
/* Responzívne úpravy pre mobil/tablet */
@media (max-width: 640px) {
    body {
        font-size: 15px;
        padding: 0 4px;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .btn-primary {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }
    .filament-card {
        padding: 0.5rem;
        font-size: 0.95rem;
    }
    #filaments-grid {
        gap: 0.75rem;
    }
    .service-card {
        padding: 0.5rem;
        font-size: 0.95rem;
    }
    .glass-nav {
        padding: 0.5rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1rem;
    }
    .btn-primary {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    .filament-card, .service-card {
        font-size: 0.9rem;
    }
    #filaments-grid {
        grid-template-columns: 1fr;
    }
}