.ismart-lg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ---------- Drag-and-drop loop widgets (used inside "My Elementor Template" card designs) ---------- */
.ismart-loop-img-wrap {
    display: block;
}

.ismart-loop-img {
    width: 100%;
    display: block;
}

.ismart-loop-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: #eef0f3;
    color: #8a8f98;
    font-size: 13px;
}

.ismart-loop-title {
    margin: 0;
}

.ismart-loop-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ismart-loop-title a:hover {
    text-decoration: underline;
}

.ismart-loop-excerpt {
    line-height: 1.6;
}

.ismart-loop-content > *:first-child {
    margin-top: 0;
}

.ismart-loop-content > *:last-child {
    margin-bottom: 0;
}

.ismart-loop-content img {
    max-width: 100%;
    height: auto;
}

.ismart-loop-date {
    font-size: 13px;
}

.ismart-loop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ismart-loop-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.ismart-loop-btn-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

.ismart-loop-btn-icon i {
    font-size: 18px;
}

.ismart-loop-btn--icon-only {
    padding: 12px;
    border-radius: 50%;
    gap: 0;
}

.ismart-lg-card {
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ismart-lg-card-img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
}

.ismart-lg-card-arrow {
    --ismart-lg-arrow-offset: 16px;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: #1a1a1a;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
    z-index: 2;
}

.ismart-lg-card-arrow svg {
    width: 45%;
    height: 45%;
}

.ismart-lg-card-img-wrap:hover .ismart-lg-card-arrow {
    transform: scale(1.08);
}

.ismart-lg-card-arrow--bottom-right {
    right: var(--ismart-lg-arrow-offset);
    bottom: var(--ismart-lg-arrow-offset);
}

.ismart-lg-card-arrow--bottom-left {
    left: var(--ismart-lg-arrow-offset);
    bottom: var(--ismart-lg-arrow-offset);
}

.ismart-lg-card-arrow--top-right {
    right: var(--ismart-lg-arrow-offset);
    top: var(--ismart-lg-arrow-offset);
}

.ismart-lg-card-arrow--top-left {
    left: var(--ismart-lg-arrow-offset);
    top: var(--ismart-lg-arrow-offset);
}

.ismart-lg-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ismart-lg-card-img-wrap:hover .ismart-lg-card-img {
    transform: scale(1.05);
}

.ismart-lg-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ismart-lg-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.ismart-lg-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.ismart-lg-title a {
    color: inherit;
    text-decoration: none;
}

.ismart-lg-title a:hover {
    text-decoration: underline;
}

.ismart-lg-excerpt {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.ismart-lg-btn {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.ismart-lg-btn:hover {
    opacity: 0.85;
    color: #fff;
}

/* Custom template mode: no forced padding/wrapper — user's own design controls spacing */
.ismart-lg-card--template {
    display: block;
}

.ismart-lg-empty {
    padding: 40px;
    text-align: center;
    color: #888;
}

.ismart-lg-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.ismart-lg-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.ismart-lg-pagination .page-numbers.current {
    background: #2563eb;
    color: #fff;
}

@media (max-width: 1024px) {
    .ismart-lg-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .ismart-lg-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ---------- Slider layout ---------- */
.ismart-lg-wrap--slider {
    position: relative;
}

.ismart-lg-swiper {
    --ismart-lg-gap: 24px;
    padding-bottom: 46px; /* room for overlaid dots */
    overflow: hidden;
}

.ismart-lg-swiper--controls-detached {
    padding-bottom: 0;
}

.ismart-lg-swiper .swiper-wrapper {
    align-items: stretch;
}

.ismart-lg-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.ismart-lg-swiper .swiper-slide .ismart-lg-card {
    width: 100%;
}

.ismart-lg-swiper-nav {
    --ismart-lg-arrows-offset: 16px;
    z-index: 3;
}

.ismart-lg-swiper-nav .swiper-button-next,
.ismart-lg-swiper-nav .swiper-button-prev {
    position: static;
    margin: 0;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    color: #1a1a1a;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ismart-lg-swiper-nav .swiper-button-next:after,
.ismart-lg-swiper-nav .swiper-button-prev:after {
    font-size: 16px;
    font-weight: 700;
}

/* Default: classic edge-pinned arrows, vertically centered on each side */
.ismart-lg-swiper-nav--sides {
    display: contents;
}

.ismart-lg-swiper-nav--sides .swiper-button-prev,
.ismart-lg-swiper-nav--sides .swiper-button-next {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
}

.ismart-lg-swiper-nav--sides .swiper-button-prev {
    left: var(--ismart-lg-arrows-offset);
}

.ismart-lg-swiper-nav--sides .swiper-button-next {
    right: var(--ismart-lg-arrows-offset);
}

/* Grouped: both arrows sit together in one corner of the carousel */
.ismart-lg-swiper-nav--top-right,
.ismart-lg-swiper-nav--top-left,
.ismart-lg-swiper-nav--bottom-right,
.ismart-lg-swiper-nav--bottom-left {
    position: absolute;
    display: flex;
    gap: 8px;
}

.ismart-lg-swiper-nav--top-right {
    top: var(--ismart-lg-arrows-offset);
    right: var(--ismart-lg-arrows-offset);
}

.ismart-lg-swiper-nav--top-left {
    top: var(--ismart-lg-arrows-offset);
    left: var(--ismart-lg-arrows-offset);
}

.ismart-lg-swiper-nav--bottom-right {
    bottom: var(--ismart-lg-arrows-offset);
    right: var(--ismart-lg-arrows-offset);
}

.ismart-lg-swiper-nav--bottom-left {
    bottom: var(--ismart-lg-arrows-offset);
    left: var(--ismart-lg-arrows-offset);
}

.ismart-lg-swiper .swiper-pagination {
    bottom: 6px;
}

.ismart-lg-swiper .swiper-pagination--top-center {
    top: 6px;
    bottom: auto;
}

.ismart-lg-swiper .swiper-pagination--bottom-left,
.ismart-lg-swiper .swiper-pagination--top-left {
    left: 12px;
    right: auto;
    width: auto;
    text-align: left;
}

.ismart-lg-swiper .swiper-pagination--bottom-right,
.ismart-lg-swiper .swiper-pagination--top-right {
    right: 12px;
    left: auto;
    width: auto;
    text-align: right;
}

.ismart-lg-swiper .swiper-pagination--top-left,
.ismart-lg-swiper .swiper-pagination--top-right {
    top: 6px;
    bottom: auto;
}

.ismart-lg-swiper .swiper-pagination-bullet {
    background: #999;
    opacity: 1;
    width: 8px;
    height: 8px;
}

.ismart-lg-swiper .swiper-pagination-bullet-active {
    background: #2563eb;
    opacity: 1;
}

/* ---------- Detached slider controls (dots + arrows sit below the cards) ---------- */
.ismart-lg-swiper-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.ismart-lg-dots-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
}

.ismart-lg-dots-controls .swiper-pagination {
    position: static;
    width: auto;
    display: flex;
    align-items: center;
}

.ismart-lg-swiper-controls .swiper-pagination {
    position: static;
    width: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ismart-lg-swiper-nav--detached {
    position: static;
    display: flex;
}
