/**
 * Categories cards styles for [trafic_categories]
 * Source: inline <style> in trafic-categories.php shortcode output
 * Condition: enqueued via shortcode (auto-enqueue pattern)
 */

/* ---- trafic_categories shortcode ---- */
.trc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}
.trc-card {
    position: relative;
    display: block;
    height: 279px;
    text-decoration: none !important;
    overflow: visible;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 325 279%27 fill=%27none%27 preserveAspectRatio=%27none%27%3E%3Cpath d=%27M0 178L198 178C221.196 178 240 196.804 240 220V279H42C18.804 279 0 260.196 0 237L0 178Z%27 fill=%27%23F8F8F8%27/%3E%3Cpath d=%27M283 0C306.196 4.92859e-06 325 18.804 325 42L325 237C325 260.196 306.196 279 283 279H241C220.013 279 203 261.987 203 241V217L42 217C18.804 217 0 198.196 0 175L0 42C0 18.804 18.804 0 42 0L283 0Z%27 fill=%27%23F1F1F1%27/%3E%3Crect x=%2750%27 y=%27217%27 width=%27163%27 height=%2725%27 fill=%27%23F1F1F1%27/%3E%3Cpath d=%27M47 217L177.06 217C191.419 217 203.06 228.641 203.06 243L47 243V217Z%27 fill=%27%23F8F8F8%27/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
.trc-card-inner {
    position: relative;
    width: calc(100% - 85px);
    height: calc(100% - 101px);
    display: flex;
    flex-direction: column;
    z-index: 1;
    overflow: hidden;
}
.trc-text-zone {
    padding: 24px 0 0 41px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 233px;
}
.trc-title {
    color: #2B4678 !important;
    font-size: 20px !important;
    font-family: 'Fira Sans', sans-serif !important;
    font-weight: 700 !important;
    line-height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
}
.trc-sep {
    display: block;
    width: 184px;
    height: 1px;
    background: #242526;
    opacity: 0.14;
}
.trc-desc {
    color: #515151 !important;
    font-size: 16px !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 500 !important;
    line-height: 20.8px !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 184px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Bottom zone with bg shape — matches Figma Rectangle 17878 (240x101) */
.trc-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 101px;
    z-index: 2;
}
/* .trc-bottom-bg removed — shape now part of .trc-card background SVG */
.trc-link-row {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-left: 47px;
    padding-bottom: 28px;
    z-index: 2;
}
.trc-link-text {
    color: #242526 !important;
    font-size: 14px !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 600 !important;
    line-height: 17.64px !important;
    position: relative;
    z-index: 2;
}
.trc-arrow-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 44px;
    flex-shrink: 0;
    position: absolute;
    right: 20px;
    top: 60%;
    transform: translateY(-50%);
}
.trc-arrow-circle svg {
    width: 44px;
    height: 43px;
}
.trc-arrow-circle .trc-arrow-bg,
.trc-arrow-circle .trc-arrow-fg {
    transition: all 0.3s;
}
.trc-card:hover .trc-arrow-circle .trc-arrow-bg {
    fill: #F8F8F8;
    stroke: #2B4678;
    stroke-width: 1;
}
.trc-card:hover .trc-arrow-circle .trc-arrow-fg {
    fill: #2B4678;
}
/* Floating image */
.trc-image {
    position: absolute;
    right: 0;
    top: 24px;
    max-width: 100px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0px 4px 11px rgba(95, 95, 95, 0.25));
    z-index: 3;
}
/* --- Responsive --- */
@media (max-width: 1024px) {
    .trc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
@media (max-width: 768px) {
    /* When swiper is active, override grid */
    .trc-grid.trc-swiper-active {
        display: block;
        overflow: hidden;
    }
    /* Override theme style.css that breaks swiper-wrapper on <=1024px */
    .trc-grid.trc-swiper-active .swiper-wrapper {
        overflow: visible !important;
        max-width: none !important;
    }
    .trc-grid.trc-swiper-active .swiper-slide {
        overflow: visible !important;
        max-width: none !important;
        width: auto;
    }
    .trc-swiper-pagination {
        display: flex;
        justify-content: center;
        gap: 6px;
        margin-top: 16px;
    }
    .trc-swiper-pagination .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #D9D9D9;
        opacity: 1;
        cursor: pointer;
    }
    .trc-swiper-pagination .swiper-pagination-bullet-active {
        background: #2B4678;
    }
}
@media (max-width: 600px) {
    .trc-grid:not(.trc-swiper-active) {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .trc-card {
        height: 220px;
    }
    .trc-card-inner {
        width: calc(100% - 70px);
        height: calc(100% - 80px);
    }
    .trc-text-zone {
        padding: 20px 0 0 24px;
    }
    .trc-title {
        font-size: 18px !important;
        line-height: 22px !important;
    }
    .trc-desc {
        font-size: 14px !important;
        line-height: 18px !important;
        -webkit-line-clamp: 3;
    }
    .trc-link-row {
        padding-left: 24px;
    }
    .trc-image {
        max-width: 80px;
        max-height: 95px;
        top: 20px;
    }
}