/* ===== TOOLS SECTION (skills page) ===== */
.tools-section {
    padding: 80px 0;
    background: #1c1c1c;
}

.tools-header {
    margin-bottom: 40px;
}

.tools-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: rgba(245, 197, 24, 0.12);
    border: 1px solid rgba(245, 197, 24, 0.35);
    color: #f5c518;
    font-size: 1.5rem;
}

.tools-header .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.tools-header .section-subtitle {
    color: #cccccc;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tools-section .container {
    overflow: visible;
}

.tools-filter-tabs-scroll {
    margin-bottom: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #f5c518 rgba(255, 255, 255, 0.1);
    scroll-snap-type: x proximity;
    padding: 0 4px 10px;
    box-sizing: border-box;
}

.tools-filter-tabs-scroll::-webkit-scrollbar {
    height: 5px;
}

.tools-filter-tabs-scroll::-webkit-scrollbar-thumb {
    background: #f5c518;
    border-radius: 4px;
}

.tools-filter-tabs-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.tools-filter-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    width: max-content;
    min-width: 100%;
    margin: 0;
}

.tool-tab {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    border: 1px solid #333;
    background: transparent;
    color: #cccccc;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

.tool-tab .fa {
    font-size: 0.95rem;
    opacity: 0.9;
}

.tool-tab:hover,
.tool-tab.active {
    background: #f5c518;
    border-color: #f5c518;
    color: #111111;
    font-weight: 600;
}

/* Large screens — center filter tab row */
@media (min-width: 992px) {
    .tools-filter-tabs-scroll {
        display: flex;
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .tools-filter-tabs {
        justify-content: center;
        width: auto;
        min-width: 0;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.tool-card {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tool-card--interactive,
.tools-strip-card {
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: center;
}

.tools-grid .tool-card--interactive {
    width: 100%;
}

.tool-card--interactive:focus,
.tools-strip-card:focus {
    outline: none;
    border-color: #f5c518;
    box-shadow: 0 8px 30px rgba(245, 197, 24, 0.2);
}

.tool-card__hint,
.tools-strip-card__hint {
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.tool-card--interactive:hover .tool-card__hint,
.tools-strip-card:hover .tools-strip-card__hint {
    color: #f5c518;
}

.tool-card:hover {
    border-color: #f5c518;
    box-shadow: 0 8px 30px rgba(245, 197, 24, 0.15);
    transform: translateY(-4px);
}

.tool-card.hidden {
    display: none;
}

.tool-logo-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.tool-logo-wrap--modal {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    margin: 0 auto 16px;
    padding: 12px;
}

.tool-logo {
    display: block;
    width: 36px;
    height: 36px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tool-logo-wrap--modal .tool-logo,
.tool-logo-wrap--modal-img {
    width: 48px;
    height: 48px;
}

/* Single-color SVG icons (Simple Icons) — visible on dark cards */
.tool-logo--mono {
    filter: brightness(0) invert(1);
}

.tool-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.tool-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.tool-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid;
    letter-spacing: 0.3px;
}

.badge-expert {
    background: rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
    color: #22c55e;
}

.badge-advanced {
    background: rgba(245, 197, 24, 0.15);
    border-color: #f5c518;
    color: #f5c518;
}

.badge-intermediate {
    background: rgba(99, 179, 237, 0.15);
    border-color: #63b3ed;
    color: #63b3ed;
}

.tool-use {
    font-size: 0.78rem;
    color: #999999;
    margin: 0;
    line-height: 1.4;
}

/* Logo fallback when CDN image fails */
.tool-logo.is-hidden {
    display: none;
}

.tool-logo-fallback {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #f5c518;
    background: #2a2a2a;
    border-radius: 8px;
    position: absolute;
    inset: 10px;
}

.tool-logo-wrap--modal .tool-logo-fallback {
    inset: 12px;
    width: auto;
    height: auto;
}

.tool-logo-fallback.is-visible {
    display: flex;
}

/* ===== TOOLS STRIP (homepage) ===== */
.tools-strip-section {
    padding: 80px 0;
    background: #1c1c1c;
}

.tools-strip-header {
    margin-bottom: 40px;
}

.tools-strip-header .tools-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: rgba(245, 197, 24, 0.12);
    border: 1px solid rgba(245, 197, 24, 0.35);
    color: #f5c518;
    font-size: 1.5rem;
}

.tools-strip-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.tools-strip-header p {
    color: #cccccc;
    font-size: 1rem;
    max-width: 620px;
    margin: 0 auto;
}

.tools-strip-marquee {
    position: relative;
    overflow: hidden;
    margin: 0 -12px;
    padding: 8px 0 16px;
}

.tools-strip-marquee__fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 72px;
    z-index: 2;
    pointer-events: none;
}

.tools-strip-marquee__fade--left {
    left: 0;
    background: linear-gradient(90deg, #1c1c1c 0%, transparent 100%);
}

.tools-strip-marquee__fade--right {
    right: 0;
    background: linear-gradient(270deg, #1c1c1c 0%, transparent 100%);
}

.tools-strip-track {
    display: flex;
    width: max-content;
    animation: toolsStripScroll 45s linear infinite;
}

.tools-strip-marquee:hover .tools-strip-track {
    animation-play-state: paused;
}

.tools-strip-track__group {
    display: flex;
    gap: 20px;
    padding: 0 10px;
}

.tools-strip-card {
    flex: 0 0 auto;
    width: 200px;
    min-height: 220px;
    border: none;
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.tools-strip-card:focus {
    outline: none;
    border-color: #f5c518;
    box-shadow: 0 8px 30px rgba(245, 197, 24, 0.2);
}

.tools-strip-card__hint {
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.tools-strip-card:hover .tools-strip-card__hint {
    color: #f5c518;
}

@keyframes toolsStripScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tools-strip-track {
        animation: none;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 16px;
    }

    .tools-strip-track__group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tools-strip-marquee {
        overflow-x: auto;
    }

    .tools-strip-marquee__fade {
        display: none;
    }
}

/* Tool detail modal (homepage strip) */
body.tool-detail-modal-open {
    overflow: hidden;
}

.tool-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tool-detail-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.tool-detail-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.tool-detail-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 32px 28px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tool-detail-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.tool-detail-modal__close:hover {
    color: #f5c518;
}

.tool-detail-panel[hidden] {
    display: none;
}

.tool-detail-panel.is-active {
    display: block;
    text-align: center;
}

.tool-detail-panel__logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: #1e1e1e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.tool-detail-panel__logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.tool-detail-panel__category {
    font-size: 0.8rem;
    color: #f5c518;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
}

.tool-detail-panel__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}

.tool-detail-panel__use {
    color: #ccc;
    font-size: 0.95rem;
    margin: 12px 0 16px;
    line-height: 1.5;
}

.tool-detail-panel__body {
    color: #999;
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 24px;
    text-align: left;
}

.tool-detail-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tool-detail-panel__close-btn {
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid #444;
    background: transparent;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-detail-panel__close-btn:hover {
    border-color: #f5c518;
    color: #f5c518;
}

.tools-strip-cta {
    margin-top: 36px;
}

.btn-view-tools {
    display: inline-block;
    padding: 12px 28px;
    border: 1px solid #f5c518;
    color: #f5c518;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-tools:hover {
    background: #f5c518;
    color: #111111;
}

@media (max-width: 768px) {
    .tools-strip-section {
        padding: 60px 0;
    }

    .tools-strip-header h3 {
        font-size: 1.65rem;
    }

    .tools-strip-card {
        width: 170px;
        min-height: 200px;
    }

    .tools-strip-marquee__fade {
        width: 40px;
    }

    .tools-section {
        padding: 60px 0;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 14px;
    }

    .tools-filter-tabs-scroll {
        margin-left: -12px;
        margin-right: -12px;
        padding: 0 12px 10px;
    }

    .tool-tab {
        font-size: 0.8rem;
        padding: 8px 18px;
    }

    .tools-header .section-title {
        font-size: 1.65rem;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
