/**
 * Grow Addon - Estilos Frontend
 * @version 1.0.0
 */

/* Estilos base del plugin */
.grow-addon-container {
    position: relative;
}

/* ============================================
   SLIDER POSTS TERRITORIOS
   ============================================ */

.slider-territorios-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.slider-territorios-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
}

.slider-territorios-slide {
    flex: 0 0 calc(33.333% - 14px); /* 3 slides visibles por defecto */
    min-width: 0; /* Permite que el contenido se encoja */
}

/* Responsive: 2 slides en tablets */
@media (max-width: 768px) {
    .slider-territorios-slide {
        flex: 0 0 calc(50% - 10px);
    }
}

/* Responsive: 1 slide en móviles */
@media (max-width: 480px) {
    .slider-territorios-slide {
        flex: 0 0 100%;
    }
}

/* Estilos del post */
.slider-territorios-post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.slider-territorios-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.slider-territorios-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.slider-territorios-post:hover .slider-territorios-thumbnail img {
    transform: scale(1.05);
}

.slider-territorios-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.slider-territorios-title {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.slider-territorios-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.slider-territorios-title a:hover {
    color: #0073aa;
}

.slider-territorios-excerpt {
    margin: 0 0 15px;
    color: #666;
    line-height: 1.6;
    flex: 1;
}

.slider-territorios-readmore {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.slider-territorios-readmore:hover {
    color: #005177;
    text-decoration: underline;
}

/* Controles de navegación */
.slider-territorios-prev,
.slider-territorios-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-territorios-prev:hover,
.slider-territorios-next:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.slider-territorios-prev {
    left: 10px;
}

.slider-territorios-next {
    right: 10px;
}

.slider-territorios-prev svg,
.slider-territorios-next svg {
    fill: #333;
    transition: fill 0.3s ease;
}

.slider-territorios-prev:hover svg,
.slider-territorios-next:hover svg {
    fill: #0073aa;
}

.slider-territorios-prev[disabled],
.slider-territorios-next[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Indicadores de paginación (dots) */
.slider-territorios-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.slider-territorios-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    padding: 0;
}

.slider-territorios-dot:hover {
    background: #bbb;
}

.slider-territorios-dot.active {
    background: #0073aa;
}

/* Ocultar controles si solo hay un slide */
.slider-territorios-container[data-slides="1"] .slider-territorios-prev,
.slider-territorios-container[data-slides="1"] .slider-territorios-next,
.slider-territorios-container[data-slides="1"] .slider-territorios-dots {
    display: none;
}
