/* ============================================================
   TOOLS PAGE — kursy.dawidmazur.pl/narzedzia/
   Kafelki narzędzi — styl identyczny z kartami kursów
   ============================================================ */

/* --- Hide Publigo page title + breadcrumbs --- */
.contenter > h1,
.contenter > .breadcrumbs {
    display: none !important;
}

/* --- Layout --- */
.dm-tools-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px 80px;
}

.dm-tools-hero {
    text-align: center;
    margin-bottom: 56px;
}

.dm-tools-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dm-tools-hero p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.67;
}

/* --- Grid (matches .dm-course-grid) --- */
.dm-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.dm-tools-grid > p,
.dm-tools-grid > br {
    display: none !important;
}

/* --- Tool card (identical structure to .dm-course-card) --- */
.dm-tool-card {
    position: relative;
    padding: 2px;
    border-radius: 14px;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    cursor: pointer;
}

/* Gradient border — subtle default */
.dm-tool-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.08);
    z-index: 0;
}

/* Gradient border — cyan on hover */
.dm-tool-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    transition: all 0.3s;
    background: linear-gradient(to right, #06B6D4, #22D3EE);
    z-index: 0;
    opacity: 0;
    visibility: hidden;
    filter: drop-shadow(0px 29px 36px rgba(34, 211, 238, 0.09));
}

.dm-tool-card:hover {
    box-shadow: 0px 19px 19px rgba(34, 211, 238, 0.03);
}

.dm-tool-card:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Inner wrapper (matches .dm-card-inner) */
.dm-tool-card-inner {
    position: relative;
    z-index: 1;
    background: #13111C;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* --- Image (matches .dm-card-image) --- */
.dm-tool-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.dm-tool-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dm-tool-card:hover .dm-tool-card-image img {
    transform: scale(1.05);
}

/* Placeholder for cards without image */
.dm-tool-card-image--placeholder {
    background: var(--dark-bg3, #21242D);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #565e78);
    font-size: 2.5rem;
}

/* --- Badge (matches .dm-card-badge) --- */
.dm-tool-card-badge {
    position: absolute;
    top: 10px;
    right: 16px;
    padding: 6px 18px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 6px;
    z-index: 5;
    color: #fff !important;
    background: var(--accent, #06B6D4);
    white-space: nowrap;
}

.dm-tool-card-badge--soon {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted) !important;
}

/* --- Body (matches .dm-card-body) --- */
.dm-tool-card-body {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Title (matches .dm-card-title: 20px) */
.dm-tool-card-body h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff !important;
    line-height: 1.3;
}

/* Description (matches .dm-card-desc: 14px) */
.dm-tool-card-body p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.67;
    margin: 0;
    flex: 1;
}

/* --- CTA button (matches .dm-card-btn) --- */
.dm-tool-card-footer {
    padding: 0 28px 28px;
}

.dm-tool-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent, #06B6D4) !important;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 50px;
    line-height: 46px;
    width: 100%;
}

.dm-tool-card:hover .dm-tool-card-btn {
    background: var(--accent, #06B6D4);
    border-color: var(--accent, #06B6D4);
    color: #0E0C15 !important;
}

/* --- "Soon" card dimmed --- */
.dm-tool-card--soon {
    cursor: default;
    opacity: 0.5;
}

.dm-tool-card--soon:hover {
    box-shadow: none;
}

.dm-tool-card--soon:hover::after {
    opacity: 0;
    visibility: hidden;
}

.dm-tool-card--soon:hover .dm-tool-card-btn {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted) !important;
}

/* --- Responsive --- */
@media (max-width: 680px) {
    .dm-tools-page {
        padding: 80px 12px 60px;
    }

    .dm-tools-grid {
        grid-template-columns: 1fr;
    }

    .dm-tool-card-body {
        padding: 20px;
    }

    .dm-tool-card-footer {
        padding: 0 20px 20px;
    }
}

/* Hide StoryWeaver tile on /narzedzia/ page (not ready) */
.dm-tool-card[href*="storyweaver"] { display: none; }
