/** Responsive CSS for RC Taxonomy Grid Plugin
 * File: assets/css/front.css
 * Author: Rober Crea
 * License: GPLv2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 */


/** Common */
h1.rctagr-taxonomy-name,
h2.rctagr-taxonomy-name,
h3.rctagr-taxonomy-name,
h4.rctagr-taxonomy-name,
h5.rctagr-taxonomy-name,
h6.rctagr-taxonomy-name,
p.rctagr-taxonomy-name,
div.rctagr-taxonomy-name,
span.rctagr-taxonomy-name {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.35s ease-in-out;
}

/** Grid Style */
.rctagr-grid-style {
    display: grid;
    width: 100%;
    align-items: end;
    gap: 20px 20px;
}

.rctagr-grid-style .rctagr-taxonomy {
    background-color: transparent;
    display: grid;
    align-items: center;
    text-align: center;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
}

.rctagr-grid-style .rctagr-taxonomy h2.rctagr-taxonomy-name {
    background-color: #111111;
    color: #ffffff;
    padding: 10px 5px;
}

.rctagr-grid-style .rctagr-taxonomy img {
    margin: 0 auto;
}

.rctagr-grid-style .rctagr-taxonomy:hover .rctagr-taxonomy-name {
    background-color: #222222;
}

@media only screen and (min-width: 360px) {
    .rctagr-grid-style {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (min-width: 720px) {
    .rctagr-grid-style {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media only screen and (min-width: 1270px) {
    .rctagr-grid-style {
        grid-template-columns: repeat(4, 1fr);
    }
}


/** Circles Style */
.rctagr-circles-style {
    display: grid;
    width: 100%;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, 120px);
}

.rctagr-circles-style .rctagr-taxonomy {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
}

.rctagr-circles-style .rctagr-taxonomy .rctagr-taxonomy-name {
    transition: all 0.35s ease-in-out;
    color: #000000;
    padding: 10px 5px;
    font-size: 16px;
    font-weight: 600;
}

.rctagr-circles-style .rctagr-taxonomy img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    margin: 0;
}

/** List Style */
.rctagr-list-style {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 4px;
}

.rctagr-list-style .rctagr-taxonomy {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
}

.rctagr-list-style .rctagr-taxonomy:hover {
    background-color: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.rctagr-list-style .rctagr-taxonomy img {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.rctagr-list-style .rctagr-taxonomy .rctagr-taxonomy-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/** Cards Style */
.rctagr-cards-style {
    column-count: 1;
    column-gap: 20px;
    width: 100%;
}

.rctagr-cards-style .rctagr-taxonomy {
    display: inline-block;
    display: block;
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.rctagr-cards-style .rctagr-taxonomy:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.rctagr-cards-style .rctagr-taxonomy img {
    width: 100%;
    height: auto;
    display: block;
}

.rctagr-cards-style .rctagr-taxonomy-name {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    padding: 8px 0;
    text-align: center;
}

@media only screen and (min-width: 400px) {
    .rctagr-cards-style {
        column-count: 2;
    }
}

@media only screen and (min-width: 600px) {
    .rctagr-cards-style {
        column-count: 3;
    }
}

@media only screen and (min-width: 900px) {
    .rctagr-cards-style {
        column-count: 4;
    }
}

@media only screen and (min-width: 1200px) {
    .rctagr-cards-style {
        column-count: 5;
    }
}

/** Overlay Style */
.rctagr-overlay-style {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, 250px);
}

.rctagr-overlay-style .rctagr-taxonomy {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    text-decoration: none !important;
    aspect-ratio: 1 / 1;
    max-height: 300px;
}

.rctagr-overlay-style .rctagr-taxonomy img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rctagr-overlay-style .rctagr-taxonomy .rctagr-taxonomy-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
    color: #ffffff;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.rctagr-overlay-style .rctagr-taxonomy .rctagr-taxonomy-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #ffffff;
    transition: transform 0.3s ease-in-out;
    text-align: center;
    padding: 0 10px;
}

/* --- Efectos Hover --- */
.rctagr-overlay-style .rctagr-taxonomy:hover .rctagr-taxonomy-overlay {
    opacity: 1;
}

.rctagr-overlay-style .rctagr-taxonomy:hover img {
    transform: scale(1.1);
}

.rctagr-overlay-style .rctagr-taxonomy:hover .rctagr-taxonomy-name {
    transform: translateY(-60px);
}

@media only screen and (max-width: 959px) {
    .rctagr-overlay-style {
        justify-content: center;
    }
}

/** Classic Style */
.rctagr-classic-style {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.rctagr-classic-style .rctagr-taxonomy {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;

    text-decoration: none !important;
    color: #333333;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.rctagr-classic-style .rctagr-taxonomy img {
    width: auto;
    max-height: 125px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.rctagr-classic-style .rctagr-taxonomy:last-child {
    border-bottom: none;
}

.rctagr-classic-style .rctagr-taxonomy:hover {
    background-color: #f5f5f5;
    color: #0073aa;
}

.rctagr-classic-style .rctagr-taxonomy-name {
    font-weight: 500;
}

/* El contador de posts/productos */
.rctagr-classic-style .rctagr-taxonomy-count {
    background-color: #e9e9e9;
    color: #555555;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 15px;
}

/** Minimalist Text Style */
.rctagr-minimalist-text-style {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px;
    justify-content: flex-start;
}

.rctagr-minimalist-text-style .rctagr-taxonomy {
    display: inline-block;
    background-color: #f0f0f1;
    color: #3c434a;
    padding: 8px 16px;
    border-radius: 20px;

    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;

    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}

.rctagr-minimalist-text-style .rctagr-taxonomy:hover {
    background-color: #007cba;
    color: #ffffff;
    border-color: #006ba1;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}