/* Pill Menu Animations */
.pill-anim-fade {
    opacity: 0;
    animation: pill-fade-in var(--pill-anim-duration, 0.7s) var(--pill-anim-curve, ease) var(--pill-anim-delay, 0s) forwards;
}

@keyframes pill-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.pill-anim-slide-left {
    opacity: 0;
    animation: pill-slide-left-in var(--pill-anim-duration, 0.7s) var(--pill-anim-curve, cubic-bezier(0.4, 0, 0.2, 1)) var(--pill-anim-delay, 0s) forwards;
}

@keyframes pill-slide-left-in {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.pill-anim-slide-right {
    opacity: 0;
    animation: pill-slide-right-in var(--pill-anim-duration, 0.7s) var(--pill-anim-curve, cubic-bezier(0.4, 0, 0.2, 1)) var(--pill-anim-delay, 0s) forwards;
}

@keyframes pill-slide-right-in {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.pill-anim-flip {
    opacity: 0;
    transform: perspective(400px) rotateY(90deg);
    animation: pill-flip-in var(--pill-anim-duration, 0.7s) var(--pill-anim-curve, cubic-bezier(0.4, 0, 0.2, 1)) var(--pill-anim-delay, 0s) forwards;
}

@keyframes pill-flip-in {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(90deg);
    }

    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0deg);
    }
}

.pill-anim-hang {
    animation: pill-hang-in var(--pill-anim-duration, 1.1s) var(--pill-anim-curve, cubic-bezier(0.68, -0.55, 0.27, 1.55)) var(--pill-anim-delay, 0s) forwards;
    transform-origin: top center;
}

@keyframes pill-hang-in {
    0% {
        transform: rotateZ(-30deg) scale(0.8);
        opacity: 0;
    }

    60% {
        transform: rotateZ(10deg) scale(1.05);
        opacity: 1;
    }

    80% {
        transform: rotateZ(-4deg) scale(0.98);
    }

    100% {
        transform: rotateZ(0deg) scale(1);
    }
}

/* Animated Text */
.scdev-text-animate {
    display: inline-block;
}

.scdev-text-animate .scdev-ta-highlight {
    display: inline-block;
}

.scdev-text-animate .scdev-ta-animate-target {
    opacity: 0;
    will-change: transform, opacity;
}

.scdev-text-animate .scdev-ta-link,
.scdev-text-animate .scdev-ta-lightbox {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

.scdev-ta-lightbox {
    cursor: pointer;
}

/* SCDev Sidebar Widgets - Main Styles */
.scdev-sw-shortcodes {
    display: none !important;
}

.scdev-widget {
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.scdev-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Rotator slider — no padding so image fills edge to edge */
.scdev-widget:has(.scdev-rotator-arrow),
.scdev-widget:has(.scdev-r-prev),
.scdev-widget:has(.scdev-r-next) {
    padding: 0 !important;
    overflow: hidden !important;
}

body.dark-mode {
    .scdev-widget {
        color: #e0e0e0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

/* Spinner */
.scdev-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: scdev-spin 0.8s linear infinite;
}

@keyframes scdev-spin {
    to {
        transform: rotate(360deg);
    }
}


/* Map */
.scdev-map-widget {
    padding: 0;
    overflow: hidden;
}

.scdev-map-locate-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.3s;
}

.scdev-map-locate-btn:hover {
    opacity: 0.85;
}

.scdev-map {
    height: 300px;
    width: 100%;
}

.scdev-map-placeholder,
.scdev-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
}

body.dark-mode {

    .scdev-map-placeholder,
    .scdev-map-loading {
        color: #999;
    }
}

/* Clock */
.scdev-clock {
    text-align: center;
}

.scdev-clock-time {
    font-size: 48px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
}

.scdev-clock-date {
    font-size: 18px;
    margin-bottom: 5px;
}

.scdev-clock-timezone {
    font-size: 14px;
    color: #666;
}

body.dark-mode {
    .scdev-clock-timezone {
        color: #999;
    }
}

/* Social */
.scdev-social {
    padding: 15px;
}

.scdev-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.scdev-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: transparent;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s, opacity 0.3s;
}

.scdev-social-link:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.scdev-social-link .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Buttons */
.scdev-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scdev-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: transform 0.2s, opacity 0.2s;
}

.scdev-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.scdev-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Recent Posts */
.scdev-recent-posts {
    padding: 0;
    overflow: hidden;
}

.scdev-recent-vertical .scdev-posts-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.scdev-recent-post-item {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.scdev-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.scdev-post-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    overflow: hidden;
}

.scdev-post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.scdev-recent-post-item:hover .scdev-post-image {
    transform: scale(1.05);
}

.scdev-post-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scdev-placeholder-icon {
    opacity: 0.3;
}

.scdev-post-overlay {
    position: relative;
    padding: 10px 15px;
}

.scdev-post-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scdev-post-date {
    font-size: 12px;
    opacity: 0.6;
}

/* Slider */
.scdev-recent-slider {
    position: relative;
    padding: 0 0 40px 0;
}

.scdev-recent-slider .scdev-posts-container {
    position: relative;
    overflow: hidden;
}

.scdev-recent-slider .scdev-slide {
    display: none;
    animation: scdev-fade-in 0.5s ease;
}

.scdev-recent-slider .scdev-slide:first-child,
.scdev-recent-slider .scdev-slide.active {
    display: block;
}

@keyframes scdev-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.scdev-slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
    pointer-events: none;
}

.scdev-slider-prev,
.scdev-slider-next {
    pointer-events: all;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scdev-slider-prev:hover,
.scdev-slider-next:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.scdev-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.scdev-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #aaa;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.scdev-dot:hover {
    border-color: #3498db;
}

.scdev-dot.active {
    background: #3498db;
    border-color: #3498db;
    width: 30px;
    border-radius: 5px;
}

:root {
    --scdev-primary-color: #3498db;
    --scdev-secondary-color: #2980b9;
}

/* Video */
.scdev-video {
    padding: 0;
    overflow: hidden;
}

.scdev-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.scdev-video-container iframe,
.scdev-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Audio */
.scdev-audio {
    padding: 15px;
}

.scdev-audio-header {
    margin-bottom: 15px;
}

.scdev-audio-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.scdev-audio-artist {
    font-size: 14px;
    color: #666;
}

.scdev-audio-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #e74c3c;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.scdev-live-indicator {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: scdev-pulse 1.5s ease-in-out infinite;
}

@keyframes scdev-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.scdev-audio-player-wrapper {
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-mode {
    .scdev-audio-player-wrapper {
        border-color: rgba(255, 255, 255, 0.08);
    }

    .scdev-audio-artist,
    .scdev-audio-time,
    .scdev-stream-status,
    .scdev-audio-mute {
        color: #999;
    }
}

.scdev-audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scdev-audio-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3498db;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.scdev-audio-play:hover {
    transform: scale(1.05);
}

.scdev-audio-play:active {
    transform: scale(0.95);
}

.scdev-audio-play svg {
    color: white;
    fill: white;
}

.scdev-audio-element {
    display: none;
}

/* SCDev Sidebar Widgets - Main Styles */

/* Loading Spinner */
.scdev-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: scdev-spin 0.8s linear infinite;
}

@keyframes scdev-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Map Widget */
.scdev-map-widget {
    padding: 0;
    overflow: hidden;
}

.scdev-map-locate-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.scdev-map-locate-btn:hover {
    background: #2980b9;
}

.scdev-map {
    height: 300px;
    width: 100%;
}

.scdev-map-placeholder,
.scdev-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f5f5f5;
    color: #666;
}

body.dark-mode {

    .scdev-map-placeholder,
    .scdev-map-loading {
        background: #2a2a2a;
        color: #999;
    }
}

/* Clock Widget */
.scdev-clock {
    text-align: center;
}

.scdev-clock-time {
    font-size: 48px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
}

.scdev-clock-date {
    font-size: 18px;
    margin-bottom: 5px;
}

.scdev-clock-timezone {
    font-size: 14px;
    color: #666;
}

body.dark-mode {
    .scdev-clock-timezone {
        color: #999;
    }
}

/* Social Links Widget */
.scdev-social {
    padding: 15px;
}

.scdev-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.scdev-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 30px;
    background: transparent;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.scdev-social-link:hover {
    transform: scale(1.1);
}

.scdev-social-link .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Button Menu Widget */
.scdev-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scdev-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.scdev-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.scdev-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Recent Posts Widget */
.scdev-recent-posts {
    padding: 0;
    overflow: hidden;
}

/* Vertical Layout */
.scdev-recent-vertical .scdev-posts-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.scdev-recent-post-item {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.scdev-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.scdev-post-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    /* 5:3 aspect ratio */
    overflow: hidden;
    background: var(--scdev-primary-color, #3498db);
}

.scdev-post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.scdev-recent-post-item:hover .scdev-post-image {
    transform: scale(1.05);
}

/* Placeholder for posts without featured image */
.scdev-post-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            var(--scdev-primary-color, #3498db) 0%,
            var(--scdev-secondary-color, #2980b9) 100%);
}

.scdev-placeholder-icon {
    opacity: 0.3;
    color: white;
}

/* Overlay with title and date */
.scdev-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    color: white;
    transition: background 0.3s ease;
}

.scdev-recent-post-item:hover .scdev-post-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 70%, transparent 100%);
}

.scdev-post-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scdev-post-date {
    font-size: 12px;
    opacity: 0.8;
    color: white;
}

/* Slider Layout */
.scdev-recent-slider {
    position: relative;
    padding: 0 0 40px 0;
    /* Space for dots */
}

.scdev-recent-slider .scdev-posts-container {
    position: relative;
    overflow: hidden;
}

.scdev-recent-slider .scdev-slide {
    display: none;
    animation: scdev-fade-in 0.5s ease;
    margin-right: 20px;
    /* Add gap between cards */
}

.scdev-recent-slider .scdev-slide:last-child {
    margin-right: 0;
}

.scdev-recent-slider .scdev-slide:first-child {
    display: block;
}

.scdev-recent-slider .scdev-slide.active {
    display: block;
}

@keyframes scdev-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Slider Controls */
.scdev-slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
    pointer-events: none;
}

.scdev-slider-prev,
.scdev-slider-next {
    pointer-events: all;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.scdev-slider-prev:hover,
.scdev-slider-next:hover {
    background: var(--scdev-primary-color, #3498db);
    transform: scale(1.1);
}

/* Slider Dots */
.scdev-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.scdev-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.scdev-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.scdev-dot.active {
    background: var(--scdev-primary-color, #3498db);
    width: 30px;
    border-radius: 5px;
}

/* Theme Color Variables (fallback to defaults) */
:root {
    --scdev-primary-color: #3498db;
    --scdev-secondary-color: #2980b9;
}

/* Dark Mode */
body.dark-mode {
    .scdev-post-placeholder {
        background: linear-gradient(135deg,
                var(--scdev-primary-color, #2980b9) 0%,
                var(--scdev-secondary-color, #1f5f8b) 100%);
    }
}

/* Video Widget */
.scdev-video {
    padding: 0;
    overflow: hidden;
}

.scdev-video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.scdev-video-container iframe,
.scdev-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Audio Widget */
.scdev-audio {
    padding: 15px;
}

.scdev-audio-header {
    margin-bottom: 15px;
    position: relative;
}

.scdev-audio-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.scdev-audio-artist {
    font-size: 14px;
    color: #666;
}

.scdev-audio-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #e74c3c;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.scdev-live-indicator {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: scdev-pulse 1.5s ease-in-out infinite;
}

@keyframes scdev-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.scdev-audio-player-wrapper {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 15px;
}

body.dark-mode {
    .scdev-audio-player-wrapper {
        background: #2a2a2a;
    }
}

.scdev-audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scdev-audio-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            var(--scdev-primary-color, #667eea) 0%,
            var(--scdev-secondary-color, #764ba2) 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.scdev-audio-play:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.scdev-audio-play:active {
    transform: scale(0.95);
}

.scdev-audio-play svg {
    color: white;
    fill: white;
}

.scdev-audio-element {
    display: none;
}

/* Waveform Visualization */
.scdev-audio-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 40px;
    margin-bottom: 10px;
}

.scdev-audio-waveform span {
    width: 3px;
    height: 8px;
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 3px;
    animation: scdev-wave-idle 1.5s ease-in-out infinite;
    opacity: 0.3;
}

.scdev-audio-waveform span:nth-child(1) {
    animation-delay: 0s;
    background: linear-gradient(to top, #f093fb, #f5576c);
}

.scdev-audio-waveform span:nth-child(2) {
    animation-delay: 0.1s;
    background: linear-gradient(to top, #4facfe, #00f2fe);
}

.scdev-audio-waveform span:nth-child(3) {
    animation-delay: 0.2s;
    background: linear-gradient(to top, #43e97b, #38f9d7);
}

.scdev-audio-waveform span:nth-child(4) {
    animation-delay: 0.3s;
    background: linear-gradient(to top, #fa709a, #fee140);
}

.scdev-audio-waveform span:nth-child(5) {
    animation-delay: 0.4s;
    background: linear-gradient(to top, #30cfd0, #330867);
}

.scdev-audio-waveform span:nth-child(6) {
    animation-delay: 0.5s;
    background: linear-gradient(to top, #a8edea, #fed6e3);
}

.scdev-audio-waveform span:nth-child(7) {
    animation-delay: 0.6s;
    background: linear-gradient(to top, #ff9a9e, #fecfef);
}

.scdev-audio-waveform span:nth-child(8) {
    animation-delay: 0.7s;
    background: linear-gradient(to top, #ffecd2, #fcb69f);
}

.scdev-audio-waveform span:nth-child(9) {
    animation-delay: 0.8s;
    background: linear-gradient(to top, #ff6e7f, #bfe9ff);
}

.scdev-audio-waveform span:nth-child(10) {
    animation-delay: 0.9s;
    background: linear-gradient(to top, #e0c3fc, #8ec5fc);
}

.scdev-audio-waveform span:nth-child(11) {
    animation-delay: 1s;
    background: linear-gradient(to top, #f093fb, #f5576c);
}

.scdev-audio-waveform span:nth-child(12) {
    animation-delay: 1.1s;
    background: linear-gradient(to top, #4facfe, #00f2fe);
}

.scdev-audio-waveform span:nth-child(13) {
    animation-delay: 1.2s;
    background: linear-gradient(to top, #43e97b, #38f9d7);
}

.scdev-audio-waveform span:nth-child(14) {
    animation-delay: 1.3s;
    background: linear-gradient(to top, #fa709a, #fee140);
}

.scdev-audio-waveform span:nth-child(15) {
    animation-delay: 1.4s;
    background: linear-gradient(to top, #30cfd0, #330867);
}

.scdev-audio-waveform span:nth-child(16) {
    animation-delay: 0.2s;
    background: linear-gradient(to top, #a8edea, #fed6e3);
}

.scdev-audio-waveform span:nth-child(17) {
    animation-delay: 0.4s;
    background: linear-gradient(to top, #ff9a9e, #fecfef);
}

.scdev-audio-waveform span:nth-child(18) {
    animation-delay: 0.6s;
    background: linear-gradient(to top, #ffecd2, #fcb69f);
}

.scdev-audio-waveform span:nth-child(19) {
    animation-delay: 0.8s;
    background: linear-gradient(to top, #ff6e7f, #bfe9ff);
}

.scdev-audio-waveform span:nth-child(20) {
    animation-delay: 1s;
    background: linear-gradient(to top, #e0c3fc, #8ec5fc);
}

@keyframes scdev-wave-idle {

    0%,
    100% {
        height: 8px;
    }

    50% {
        height: 16px;
    }
}

/* Active waveform when playing */
.scdev-audio.playing .scdev-audio-waveform span {
    animation: scdev-wave-active 0.8s ease-in-out infinite;
    opacity: 1;
}

@keyframes scdev-wave-active {

    0%,
    100% {
        height: 12px;
    }

    50% {
        height: 32px;
    }
}

/* Progress Bar */
.scdev-audio-progress {
    flex: 1;
}

.scdev-audio-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.scdev-audio-progress-fill {
    height: 100%;
    background: linear-gradient(90deg,
            var(--scdev-primary-color, #667eea) 0%,
            var(--scdev-secondary-color, #764ba2) 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.scdev-audio-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
    margin-top: 6px;
}

/* Stream Visualizer */
.scdev-audio-stream-info {
    flex: 1;
    text-align: center;
}

.scdev-stream-status {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.scdev-stream-visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
}

.scdev-stream-visualizer span {
    width: 4px;
    height: 10px;
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 2px;
    animation: scdev-stream-wave 1s ease-in-out infinite;
}

.scdev-stream-visualizer span:nth-child(1) {
    animation-delay: 0s;
    background: linear-gradient(to top, #f093fb, #f5576c);
}

.scdev-stream-visualizer span:nth-child(2) {
    animation-delay: 0.1s;
    background: linear-gradient(to top, #4facfe, #00f2fe);
}

.scdev-stream-visualizer span:nth-child(3) {
    animation-delay: 0.2s;
    background: linear-gradient(to top, #43e97b, #38f9d7);
}

.scdev-stream-visualizer span:nth-child(4) {
    animation-delay: 0.3s;
    background: linear-gradient(to top, #fa709a, #fee140);
}

.scdev-stream-visualizer span:nth-child(5) {
    animation-delay: 0.4s;
    background: linear-gradient(to top, #30cfd0, #330867);
}

.scdev-stream-visualizer span:nth-child(6) {
    animation-delay: 0.5s;
    background: linear-gradient(to top, #a8edea, #fed6e3);
}

.scdev-stream-visualizer span:nth-child(7) {
    animation-delay: 0.6s;
    background: linear-gradient(to top, #ff9a9e, #fecfef);
}

.scdev-stream-visualizer span:nth-child(8) {
    animation-delay: 0.7s;
    background: linear-gradient(to top, #ffecd2, #fcb69f);
}

.scdev-stream-visualizer span:nth-child(9) {
    animation-delay: 0.8s;
    background: linear-gradient(to top, #ff6e7f, #bfe9ff);
}

.scdev-stream-visualizer span:nth-child(10) {
    animation-delay: 0.9s;
    background: linear-gradient(to top, #e0c3fc, #8ec5fc);
}

@keyframes scdev-stream-wave {

    0%,
    100% {
        height: 10px;
    }

    50% {
        height: 35px;
    }
}

/* Volume Control */
.scdev-audio-volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scdev-audio-mute {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.scdev-audio-volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    outline: none;
}

.scdev-audio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--scdev-primary-color, #667eea);
    border-radius: 50%;
    cursor: pointer;
}

.scdev-audio-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--scdev-primary-color, #667eea);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.scdev-audio-footer {
    margin-top: 10px;
    text-align: center;
    color: #999;
    font-size: 11px;
}

body.dark-mode {
    .scdev-audio-player-wrapper {
        background: #2a2a2a;
    }

    .scdev-audio-artist {
        color: #999;
    }

    .scdev-audio-time {
        color: #999;
    }

    .scdev-stream-status {
        color: #999;
    }

    .scdev-audio-mute {
        color: #999;
    }
}

/* Image Widget */
.scdev-image {
    padding: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.scdev-image img {
    width: 100%;
    height: auto;
    display: block;
}

.scdev-image a {
    display: block;
    cursor: zoom-in;
}

.scdev-image-caption {
    padding: 12px 15px;
    font-size: 14px;
    color: #666;
    text-align: center;
    background: #f9f9f9;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode .scdev-image-caption,
body.dark .scdev-image-caption,
body[data-theme="dark"] .scdev-image-caption,
html[data-theme="dark"] .scdev-image-caption,
html.dark .scdev-image-caption {
    background: #2a2a2a;
    color: #999;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.light) .scdev-image-caption {
        /*   background: #2a2a2a; */
        color: #808386;
    }
}

.scdev-image-gallery-widget {
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    --scdev-gallery-tile-height: clamp(120px, 22vw, 220px);
    --scdev-gallery-gap: 10px;
    --scdev-gallery-column-gap: var(--scdev-gallery-gap);
    --scdev-gallery-row-gap: var(--scdev-gallery-gap);
    --scdev-gallery-caption-gap: 10px;
    --scdev-gallery-radius: 6px;
}

.scdev-image-gallery,
.scdev-image-gallery-groups {
    display: grid;
    column-gap: var(--scdev-gallery-column-gap);
    row-gap: var(--scdev-gallery-row-gap);
    width: 100%;
}

.scdev-image-gallery-item {
    position: relative;
    overflow: hidden;
    min-width: 0;
    min-height: var(--scdev-gallery-tile-height);
    border-radius: var(--scdev-gallery-radius);
    background: #f2f2f2;
}

.scdev-image-gallery-item>a,
.scdev-image-gallery-item>.scdev-image-static {
    display: block;
    width: 100%;
    height: 100%;
}

.scdev-image-gallery-item img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    border-radius: var(--scdev-gallery-radius);
}

.scdev-image-link {
    cursor: pointer !important;
}

.scdev-image-shape-soft-blob:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-soft-blob:not(.scdev-image-gallery-widget)>.scdev-image-static,
.scdev-image-shape-mixed-shapes:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-mixed-shapes:not(.scdev-image-gallery-widget)>.scdev-image-static {
    overflow: hidden;
    border-radius: 42% 58% 52% 48% / 48% 42% 58% 52%;
}

.scdev-image-shape-soft-blob .scdev-image-gallery-item {
    border-radius: 42% 58% 52% 48% / 48% 42% 58% 52%;
}

.scdev-image-shape-soft-blob .scdev-image-gallery-item:nth-child(2) {
    border-radius: 58% 42% 44% 56% / 52% 58% 42% 48%;
}

.scdev-image-shape-soft-blob .scdev-image-gallery-item:nth-child(3) {
    border-radius: 46% 54% 62% 38% / 62% 38% 46% 54%;
}

.scdev-image-shape-magazine-cutout:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-magazine-cutout:not(.scdev-image-gallery-widget)>.scdev-image-static,
.scdev-image-shape-magazine-cutout .scdev-image-gallery-item {
    overflow: hidden;
    border-radius: 8px;
    clip-path: polygon(0 8%, 92% 0, 100% 88%, 8% 100%);
}

.scdev-image-shape-circle-grid:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-circle-grid:not(.scdev-image-gallery-widget)>.scdev-image-static {
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.scdev-image-shape-circle-grid:not(.scdev-image-gallery-widget)>a img,
.scdev-image-shape-circle-grid:not(.scdev-image-gallery-widget)>.scdev-image-static img,
.scdev-image-shape-diamond-showcase:not(.scdev-image-gallery-widget)>a img,
.scdev-image-shape-diamond-showcase:not(.scdev-image-gallery-widget)>.scdev-image-static img {
    height: 100%;
    object-fit: cover;
}

.scdev-image-shape-circle-grid .scdev-image-gallery-item {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.scdev-image-shape-diamond-showcase:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-diamond-showcase:not(.scdev-image-gallery-widget)>.scdev-image-static,
.scdev-image-shape-diamond-showcase .scdev-image-gallery-item {
    overflow: hidden;
    aspect-ratio: 1 / 1;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.scdev-image-shape-arch-portraits:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-arch-portraits:not(.scdev-image-gallery-widget)>.scdev-image-static,
.scdev-image-shape-arch-portraits .scdev-image-gallery-item {
    overflow: hidden;
    border-radius: 999px 999px 10px 10px;
}

.scdev-image-shape-ticket-style:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-ticket-style:not(.scdev-image-gallery-widget)>.scdev-image-static,
.scdev-image-shape-ticket-style .scdev-image-gallery-item {
    overflow: hidden;
    border-radius: 12px;
    clip-path: polygon(0 0, 100% 0, 100% 38%, 94% 50%, 100% 62%, 100% 100%, 0 100%, 0 62%, 6% 50%, 0 38%);
}

.scdev-image-shape-wave-cards:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-wave-cards:not(.scdev-image-gallery-widget)>.scdev-image-static,
.scdev-image-shape-wave-cards .scdev-image-gallery-item {
    overflow: hidden;
    border-radius: 16px 16px 6px 6px;
    clip-path: polygon(0 0, 100% 0, 100% 82%, 78% 100%, 52% 88%, 24% 100%, 0 86%);
}

.scdev-image-shape-mixed-shapes .scdev-image-gallery-item {
    border-radius: 18px;
}

.scdev-image-shape-mixed-shapes .scdev-image-gallery-item:nth-child(1) {
    border-radius: 42% 58% 52% 48% / 48% 42% 58% 52%;
}

.scdev-image-shape-mixed-shapes .scdev-image-gallery-item:nth-child(2) {
    border-radius: 999px 999px 10px 10px;
}

.scdev-image-shape-mixed-shapes .scdev-image-gallery-item:nth-child(3) {
    aspect-ratio: 1 / 1;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.scdev-image-shape-mixed-shapes .scdev-image-gallery-item:nth-child(4) {
    clip-path: polygon(0 8%, 92% 0, 100% 88%, 8% 100%);
}

.scdev-image-shape-mixed-shapes .scdev-image-gallery-item:nth-child(5) {
    border-radius: 50%;
}

.scdev-image-shape-mixed-shapes .scdev-image-gallery-item:nth-child(6) {
    clip-path: polygon(0 0, 100% 0, 100% 82%, 78% 100%, 52% 88%, 24% 100%, 0 86%);
}

.scdev-image-caption-outside.scdev-image-gallery-item,
.scdev-image-caption-outside:not(.scdev-image-gallery-item) {
    display: flex;
    flex-direction: column;
    gap: var(--scdev-gallery-caption-gap, 10px);
    overflow: visible;
}

.scdev-image-caption-outside.scdev-image-gallery-item {
    background: transparent;
    border-radius: 0 !important;
    clip-path: none !important;
}

.scdev-image-caption-outside>.scdev-image-media-frame {
    display: block;
    width: 100%;
    min-height: var(--scdev-gallery-tile-height, 0);
    overflow: hidden;
    background: #f2f2f2;
    border-radius: var(--scdev-gallery-radius, 6px);
}

.scdev-image-caption-outside>.scdev-image-media-frame img {
    width: 100%;
    min-height: 0;
    object-fit: cover;
}

.scdev-image-gallery-item.scdev-image-caption-outside>.scdev-image-media-frame img {
    width: 100% !important;
    height: 100% !important;
}

.scdev-image-shape-soft-blob .scdev-image-caption-outside>.scdev-image-media-frame,
.scdev-image-shape-soft-blob:not(.scdev-image-gallery-widget)>.scdev-image-media-frame,
.scdev-image-shape-mixed-shapes:not(.scdev-image-gallery-widget)>.scdev-image-media-frame {
    border-radius: 42% 58% 52% 48% / 48% 42% 58% 52%;
}

.scdev-image-shape-soft-blob .scdev-image-caption-outside:nth-child(2)>.scdev-image-media-frame {
    border-radius: 58% 42% 44% 56% / 52% 58% 42% 48%;
}

.scdev-image-shape-soft-blob .scdev-image-caption-outside:nth-child(3)>.scdev-image-media-frame {
    border-radius: 46% 54% 62% 38% / 62% 38% 46% 54%;
}

.scdev-image-shape-magazine-cutout .scdev-image-caption-outside>.scdev-image-media-frame,
.scdev-image-shape-magazine-cutout:not(.scdev-image-gallery-widget)>.scdev-image-media-frame {
    border-radius: 8px;
    clip-path: polygon(0 8%, 92% 0, 100% 88%, 8% 100%);
}

.scdev-image-shape-circle-grid .scdev-image-caption-outside>.scdev-image-media-frame,
.scdev-image-shape-circle-grid:not(.scdev-image-gallery-widget)>.scdev-image-media-frame {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.scdev-image-shape-diamond-showcase .scdev-image-caption-outside>.scdev-image-media-frame,
.scdev-image-shape-diamond-showcase:not(.scdev-image-gallery-widget)>.scdev-image-media-frame {
    aspect-ratio: 1 / 1;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.scdev-image-shape-arch-portraits .scdev-image-caption-outside>.scdev-image-media-frame,
.scdev-image-shape-arch-portraits:not(.scdev-image-gallery-widget)>.scdev-image-media-frame {
    border-radius: 999px 999px 10px 10px;
}

.scdev-image-shape-ticket-style .scdev-image-caption-outside>.scdev-image-media-frame,
.scdev-image-shape-ticket-style:not(.scdev-image-gallery-widget)>.scdev-image-media-frame {
    border-radius: 12px;
    clip-path: polygon(0 0, 100% 0, 100% 38%, 94% 50%, 100% 62%, 100% 100%, 0 100%, 0 62%, 6% 50%, 0 38%);
}

.scdev-image-shape-wave-cards .scdev-image-caption-outside>.scdev-image-media-frame,
.scdev-image-shape-wave-cards:not(.scdev-image-gallery-widget)>.scdev-image-media-frame {
    border-radius: 16px 16px 6px 6px;
    clip-path: polygon(0 0, 100% 0, 100% 82%, 78% 100%, 52% 88%, 24% 100%, 0 86%);
}

.scdev-image-shape-mixed-shapes .scdev-image-caption-outside:nth-child(1)>.scdev-image-media-frame {
    border-radius: 42% 58% 52% 48% / 48% 42% 58% 52%;
}

.scdev-image-shape-mixed-shapes .scdev-image-caption-outside:nth-child(2)>.scdev-image-media-frame {
    border-radius: 999px 999px 10px 10px;
}

.scdev-image-shape-mixed-shapes .scdev-image-caption-outside:nth-child(3)>.scdev-image-media-frame {
    aspect-ratio: 1 / 1;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.scdev-image-shape-mixed-shapes .scdev-image-caption-outside:nth-child(4)>.scdev-image-media-frame {
    clip-path: polygon(0 8%, 92% 0, 100% 88%, 8% 100%);
}

.scdev-image-shape-mixed-shapes .scdev-image-caption-outside:nth-child(5)>.scdev-image-media-frame {
    border-radius: 50%;
}

.scdev-image-shape-mixed-shapes .scdev-image-caption-outside:nth-child(6)>.scdev-image-media-frame {
    clip-path: polygon(0 0, 100% 0, 100% 82%, 78% 100%, 52% 88%, 24% 100%, 0 86%);
}

.scdev-image-gallery-layout-equal .scdev-image-gallery-direct {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.scdev-image-gallery-layout-equal .scdev-image-gallery-item {
    aspect-ratio: 1 / 1;
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-2 .scdev-image-gallery-direct {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-direct {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, var(--scdev-gallery-tile-height));
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1 {
    grid-row: span 2;
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-4 .scdev-image-gallery-direct {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-4 .scdev-image-gallery-item {
    aspect-ratio: 1 / 1;
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-direct {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-item-3 {
    grid-column: 1 / -1;
}

.scdev-image-gallery-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, var(--scdev-gallery-tile-height));
    column-gap: var(--scdev-gallery-column-gap);
    row-gap: var(--scdev-gallery-row-gap);
}

.scdev-image-gallery-group.is-reverse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1 {
    grid-row: span 2;
}

.scdev-image-gallery-group-count-3.is-reverse .scdev-image-gallery-item-1 {
    grid-column: 2;
}

.scdev-image-gallery-group-count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: var(--scdev-gallery-tile-height);
}

.scdev-image-gallery-group-count-1 {
    grid-template-columns: 1fr;
    grid-template-rows: var(--scdev-gallery-tile-height);
}

.scdev-image-ratio-1-1 .scdev-image-gallery-item,
.scdev-image-ratio-4-3 .scdev-image-gallery-item,
.scdev-image-ratio-16-9 .scdev-image-gallery-item,
.scdev-image-ratio-2-1 .scdev-image-gallery-item {
    aspect-ratio: var(--scdev-image-ratio);
    min-height: 0;
}

.scdev-image-gallery-layout-mosaic .scdev-image-gallery-item {
    aspect-ratio: auto;
}

.scdev-image-has-ratio-size:not(.scdev-image-gallery-widget) {
    width: max-content;
    max-width: 100%;
}

.scdev-image-has-ratio-size:not(.scdev-image-gallery-widget)>a,
.scdev-image-has-ratio-size:not(.scdev-image-gallery-widget)>.scdev-image-static {
    width: var(--scdev-gallery-item-width);
    max-width: 100%;
    height: var(--scdev-gallery-tile-height);
}

.scdev-image-has-ratio-size:not(.scdev-image-gallery-widget) img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery,
.scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-groups,
.scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-group {
    justify-content: center;
}

.scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-item {
    width: var(--scdev-gallery-item-width);
    max-width: 100%;
    height: var(--scdev-gallery-tile-height);
    min-height: 0;
    justify-self: center;
}

.scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-item img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    object-fit: cover;
}

.scdev-image-has-ratio-size.scdev-image-gallery-layout-equal .scdev-image-gallery-direct {
    grid-template-columns: repeat(auto-fit, var(--scdev-gallery-item-width));
    justify-content: center;
}

.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-1 .scdev-image-gallery-direct {
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: var(--scdev-gallery-item-width);
}

.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-2 .scdev-image-gallery-direct,
.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-4 .scdev-image-gallery-direct,
.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-direct {
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(2, var(--scdev-gallery-item-width));
}

.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-direct {
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: var(--scdev-gallery-tall-width) var(--scdev-gallery-item-width);
}

.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1 {
    width: var(--scdev-gallery-tall-width);
    height: var(--scdev-gallery-tall-height);
}

.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-item-3 {
    width: var(--scdev-gallery-wide-width);
}

.scdev-image-has-ratio-size .scdev-image-gallery-group {
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: var(--scdev-gallery-tall-width) var(--scdev-gallery-item-width);
}

.scdev-image-has-ratio-size .scdev-image-gallery-group.is-reverse {
    grid-template-columns: var(--scdev-gallery-item-width) var(--scdev-gallery-tall-width);
}

.scdev-image-has-ratio-size .scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1 {
    width: var(--scdev-gallery-tall-width);
    height: var(--scdev-gallery-tall-height);
}

.scdev-image-has-ratio-size .scdev-image-gallery-group-count-2 {
    grid-template-columns: repeat(2, var(--scdev-gallery-item-width));
}

.scdev-image-has-ratio-size .scdev-image-gallery-group-count-1 {
    grid-template-columns: var(--scdev-gallery-item-width);
}

.scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-item.scdev-image-caption-outside {
    width: var(--scdev-gallery-item-width);
    height: auto;
    min-height: 0;
}

.scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-item.scdev-image-caption-outside>.scdev-image-media-frame {
    width: 100%;
    height: var(--scdev-gallery-tile-height);
    min-height: 0;
}

.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside>.scdev-image-media-frame,
.scdev-image-has-ratio-size .scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside>.scdev-image-media-frame {
    height: var(--scdev-gallery-tall-height);
}

.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside,
.scdev-image-has-ratio-size .scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside {
    width: var(--scdev-gallery-tall-width);
}

.scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-item-3.scdev-image-caption-outside {
    width: var(--scdev-gallery-wide-width);
}

.scdev-image-gallery-widget.scdev-image-captions-outside {
    --scdev-gallery-caption-space: 50px;
    --scdev-gallery-cell-height: calc(var(--scdev-gallery-tile-height) + var(--scdev-gallery-caption-space));
}

.scdev-image-gallery-widget.scdev-image-captions-outside.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-direct,
.scdev-image-gallery-widget.scdev-image-captions-outside .scdev-image-gallery-group {
    grid-template-rows: repeat(2, var(--scdev-gallery-cell-height));
}

.scdev-image-gallery-widget.scdev-image-captions-outside .scdev-image-gallery-group-count-2,
.scdev-image-gallery-widget.scdev-image-captions-outside .scdev-image-gallery-group-count-1 {
    grid-template-rows: var(--scdev-gallery-cell-height);
}

.scdev-image-gallery-widget.scdev-image-captions-outside .scdev-image-caption {
    min-height: 40px;
    padding: 6px 12px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The height slider is the source of truth for every image shape. */
.scdev-image-gallery-widget .scdev-image-gallery-item {
    height: var(--scdev-gallery-tile-height);
    min-height: 0;
    aspect-ratio: auto !important;
}

.scdev-image-gallery-widget .scdev-image-gallery-item>a,
.scdev-image-gallery-widget .scdev-image-gallery-item>.scdev-image-static {
    height: 100%;
}

.scdev-image-gallery-widget .scdev-image-gallery-item img {
    height: 100% !important;
    min-height: 0;
    object-fit: cover;
}

.scdev-image-gallery-widget .scdev-image-caption-outside {
    height: auto;
    min-height: 0;
}

.scdev-image-gallery-widget .scdev-image-caption-outside>.scdev-image-media-frame {
    height: var(--scdev-gallery-tile-height);
    min-height: 0;
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1,
.scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1 {
    height: var(--scdev-gallery-tall-height);
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside,
.scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside {
    height: auto;
}

.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside>.scdev-image-media-frame,
.scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside>.scdev-image-media-frame {
    height: var(--scdev-gallery-tall-height);
}

.scdev-image:not(.scdev-image-gallery-widget)>a,
.scdev-image:not(.scdev-image-gallery-widget)>.scdev-image-static,
.scdev-image:not(.scdev-image-gallery-widget)>.scdev-image-media-frame {
    height: var(--scdev-gallery-tile-height);
}

.scdev-image:not(.scdev-image-gallery-widget)>a img,
.scdev-image:not(.scdev-image-gallery-widget)>.scdev-image-static img,
.scdev-image:not(.scdev-image-gallery-widget)>.scdev-image-media-frame img {
    height: 100% !important;
    object-fit: cover;
}

.scdev-image-shape-circle-grid:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-circle-grid:not(.scdev-image-gallery-widget)>.scdev-image-static,
.scdev-image-shape-circle-grid:not(.scdev-image-gallery-widget)>.scdev-image-media-frame,
.scdev-image-shape-diamond-showcase:not(.scdev-image-gallery-widget)>a,
.scdev-image-shape-diamond-showcase:not(.scdev-image-gallery-widget)>.scdev-image-static,
.scdev-image-shape-diamond-showcase:not(.scdev-image-gallery-widget)>.scdev-image-media-frame {
    width: var(--scdev-gallery-tile-height);
    max-width: 100%;
}

.scdev-image-shape-circle-grid.scdev-image-gallery-widget {
    --scdev-circle-size: var(--scdev-gallery-tile-height);
    --scdev-circle-tall-size: var(--scdev-gallery-tall-height);
}

.scdev-image-shape-circle-grid.scdev-image-gallery-widget.scdev-image-captions-outside {
    --scdev-circle-tall-size: calc(var(--scdev-gallery-tall-height) + var(--scdev-gallery-caption-space));
}

.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-gallery-direct,
.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-gallery-group {
    justify-content: center;
}

.scdev-image-shape-circle-grid.scdev-image-gallery-layout-equal .scdev-image-gallery-direct {
    grid-template-columns: repeat(auto-fit, minmax(var(--scdev-circle-size), var(--scdev-circle-size)));
}

.scdev-image-shape-circle-grid.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-2 .scdev-image-gallery-direct,
.scdev-image-shape-circle-grid.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-4 .scdev-image-gallery-direct,
.scdev-image-shape-circle-grid.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-direct,
.scdev-image-shape-circle-grid .scdev-image-gallery-group-count-2 {
    grid-template-columns: repeat(2, var(--scdev-circle-size));
}

.scdev-image-shape-circle-grid.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-direct,
.scdev-image-shape-circle-grid .scdev-image-gallery-group-count-3 {
    grid-template-columns: var(--scdev-circle-tall-size) var(--scdev-circle-size);
}

.scdev-image-shape-circle-grid .scdev-image-gallery-group-count-3.is-reverse {
    grid-template-columns: var(--scdev-circle-size) var(--scdev-circle-tall-size);
}

.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-gallery-item {
    width: var(--scdev-circle-size) !important;
    max-width: 100%;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0;
    align-self: start;
    justify-self: center;
}

.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-gallery-item:not(.scdev-image-caption-outside) {
    overflow: hidden;
    border-radius: 50%;
}

.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-gallery-item>a,
.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-gallery-item>.scdev-image-static {
    width: 100%;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0;
    overflow: hidden;
    border-radius: 50%;
}

.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-caption-outside {
    width: var(--scdev-circle-size) !important;
    height: auto !important;
    overflow: visible;
    border-radius: 0 !important;
}

.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-caption-outside>.scdev-image-media-frame {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0;
    overflow: hidden;
    border-radius: 50%;
}

.scdev-image-shape-circle-grid.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1,
.scdev-image-shape-circle-grid .scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1 {
    width: var(--scdev-circle-tall-size) !important;
    max-width: 100%;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
}

.scdev-image-shape-circle-grid.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside,
.scdev-image-shape-circle-grid .scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside {
    width: var(--scdev-circle-tall-size) !important;
    height: auto !important;
}

.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-gallery-item img,
.scdev-image-shape-circle-grid.scdev-image-gallery-widget .scdev-image-caption-outside>.scdev-image-media-frame img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    object-fit: cover;
    border-radius: 50%;
}

/* Lightbox */
.scdev-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.scdev-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.scdev-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

.scdev-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.scdev-lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
}

/* HTML Widget */
.scdev-html {
    padding: 15px;
}

/* Categories Widget */
.scdev-categories {
    padding: 15px;
}

.scdev-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0;
}

.scdev-category-item {
    margin-bottom: 8px;
}

.scdev-category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f5f5f5;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    margin: 0px 2px;
}

.scdev-category-link:hover {
    background: #3498db;
    color: white;
    transform: translateX(5px);
}

.scdev-category-name {
    font-weight: 500;
}

.scdev-category-count {
    font-size: 12px;
    opacity: 0.7;
}

body.dark-mode {
    .scdev-category-link {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .scdev-category-link:hover {
        background: #3498db;
        color: white;
    }
}

/* Posts by Category Widget */
.scdev-posts-by-category {
    padding: 15px;
}

.scdev-category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.scdev-filter-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #333;
}

.scdev-filter-btn:hover {
    background: #e0e0e0;
}

.scdev-filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.scdev-posts-grid {
    display: grid;
    gap: 0;
}

.scdev-layout-list .scdev-posts-grid {
    grid-template-columns: 1fr;
}

.scdev-layout-grid .scdev-posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.scdev-layout-grid[data-columns="2"] .scdev-posts-grid {
    grid-template-columns: repeat(2, 1fr);
}

.scdev-layout-grid[data-columns="3"] .scdev-posts-grid {
    grid-template-columns: repeat(3, 1fr);
}

.scdev-layout-grid[data-columns="4"] .scdev-posts-grid {
    grid-template-columns: repeat(4, 1fr);
}

.scdev-post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scdev-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scdev-post-card-thumbnail {
    width: 100%;
    overflow: hidden;
}

.scdev-post-card-thumbnail img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.scdev-post-card:hover .scdev-post-card-thumbnail img {
    transform: scale(1.05);
}

.scdev-post-card-content {
    padding: 8px 15px;
}

.scdev-post-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    line-height: 1.4;
    text-align: center !important;
}

.scdev-post-card-title a {
    color: #333;
    text-decoration: none;
}

.scdev-post-card-title a:hover {
    color: #333;
}

.scdev-post-card-date {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.scdev-post-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.scdev-posts-grid.scdev-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

body.dark-mode {
    .scdev-category-filter {
        border-bottom-color: #333;
    }

    .scdev-filter-btn {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    .scdev-filter-btn:hover {
        background: #333;
    }

    .scdev-filter-btn.active {
        background: #3498db;
        color: white;
    }

    .scdev-post-card {
        background: #1e1e1e;
    }

    .scdev-post-card-title a {
        color: #e0e0e0;
    }

    .scdev-post-card-date,
    .scdev-post-card-excerpt {
        color: #999;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .scdev-widget {
        padding: 15px;
    }

    .scdev-clock-time {
        font-size: 36px;
    }

    .scdev-layout-grid .scdev-posts-grid,
    .scdev-layout-grid[data-columns="2"] .scdev-posts-grid,
    .scdev-layout-grid[data-columns="3"] .scdev-posts-grid,
    .scdev-layout-grid[data-columns="4"] .scdev-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Pill Menu */
.scdev-pill-menu-container {
    width: 100%;
}

.scdev-pill-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.scdev-pill-menu-container[data-layout="vertical"] .scdev-pill-menu {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
}

.scdev-pill-menu .scdev-pill-menu-item {
    justify-content: flex-start;
    text-align: left;
}

.scdev-pill-menu .scdev-pill-menu-item:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Pill Menu Search Bar */
.scdev-pill-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.scdev-pill-search {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    /* background: #f8f9fa; */
    color: #333;
}

.scdev-pill-search:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    /* background: #fff; */
}

.scdev-pill-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.scdev-pill-search-results.active {
    display: block;
}

.scdev-pill-search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.scdev-pill-search-result-item:last-child {
    border-bottom: none;
}

.scdev-pill-search-result-item:hover {
    background: #f8f9fa;
}

.scdev-pill-search-result-item a {
    color: #333;
    text-decoration: none;
    display: block;
}

.scdev-pill-search-result-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.scdev-pill-search-result-excerpt {
    font-size: 12px;
    color: #666;
}

body.dark-mode {
    .scdev-pill-search {
        /* background: #2a2a2a; */
        border-color: #444;
        color: #e0e0e0;
    }

    .scdev-pill-search-results {
        /*    background: #1e1e1e; */
        border-color: #444;
    }

    .scdev-pill-search-result-item {
        border-bottom-color: #333;
    }

    .scdev-pill-search-result-item:hover {
        background: #2a2a2a;
    }

    .scdev-pill-search-result-item a {
        color: #e0e0e0;
    }

    .scdev-pill-search-result-excerpt {
        color: #999;
    }
}

/* Post Rotator */
.scdev-post-rotator-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px auto;
}

.scdev-rotator-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scdev-rotator-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scdev-rotator-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.scdev-rotator-image {
    width: 100%;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.scdev-rotator-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
}

.scdev-rotator-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff !important;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scdev-rotator-type {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 193, 7, 0.9);
    border-radius: 10px;
    font-size: 10px;
    color: #000;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

body.dark-mode {
    .scdev-post-rotator-vertical .scdev-rotator-item {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .scdev-post-rotator-vertical .scdev-rotator-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .scdev-rotator-controls {
        border-top-color: #333;
    }

    .scdev-rotator-prev,
    .scdev-rotator-next {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .scdev-rotator-prev:hover,
    .scdev-rotator-next:hover {
        background: #3498db;
        color: white;
    }

    .scdev-rotator-dot {
        background: #444;
    }

    .scdev-rotator-dot:hover {
        background: #666;
    }
}


/* Post Rotator - Slider Layout */
.scdev-rotator-slider {
    overflow: hidden;
}

.scdev-rotator-slider .scdev-rotator-item {
    display: none;
}

.scdev-rotator-slider .scdev-rotator-item.active {
    display: block;
}

.scdev-rotator-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.scdev-rotator-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.scdev-rotator-prev {
    left: 6px;
}

.scdev-rotator-next {
    right: 6px;
}

/* Posts by Category - heading */
.scdev-cat-heading {
    text-align: center;
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scdev-cat-heading a {
    color: inherit;
    text-decoration: none;
}

.scdev-cat-heading a:hover {
    text-decoration: underline;
}

/* Search Bar Widget */
.scdev-search-bar {
    padding: 0;
}

.scdev-search-wrap {
    position: relative;
}

.scdev-search-input {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: transparent;
    color: inherit;
}

.scdev-search-input:focus {
    border-color: #3498db;
}

.scdev-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 14px;
    opacity: 0.5;
}

.scdev-search-results {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: Canvas;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.scdev-search-result-item {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: opacity 0.2s;
}

.scdev-search-result-item:last-child {
    border-bottom: none;
}

.scdev-search-result-item:hover {
    opacity: 0.7;
}

.scdev-search-result-title {
    font-size: 13px;
    font-weight: 600;
}

.scdev-search-result-excerpt {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 2px;
}

.scdev-search-no-results {
    padding: 10px 12px;
    font-size: 13px;
    opacity: 0.6;
}

body.dark-mode .scdev-search-results {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .scdev-search-result-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}


/* Search Bar Widget */
.scdev-search-bar {
    padding: 0;
}

.scdev-search-wrap {
    position: relative;
}

.scdev-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: transparent;
    color: inherit;
}

.scdev-search-input:focus {
    border-color: #3498db;
}

.scdev-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 14px;
    opacity: 0.5;
    line-height: 1;
}

.scdev-search-results {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: Canvas;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.scdev-search-result-item {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: opacity 0.2s;
}

.scdev-search-result-item:last-child {
    border-bottom: none;
}

.scdev-search-result-item:hover {
    opacity: 0.7;
}

.scdev-search-result-title {
    font-size: 13px;
    font-weight: 600;
    font-style: italic;
}

.scdev-search-result-excerpt {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 2px;
    font-style: italic;
}

.scdev-search-no-results {
    padding: 10px 12px;
    font-size: 13px;
    opacity: 0.6;
    font-style: italic;
}

body.dark-mode .scdev-search-results {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .scdev-search-result-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Posts by Category - Carousel Slider */
.scdev-pbc-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.scdev-pbc-track {
    position: relative;
    width: 100%;
}

.scdev-pbc-card {
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.scdev-pbc-card.active {
    display: block;
}

/* Image wrapper — enforces the height, clips the image */
.scdev-pbc-img-wrap {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
    text-decoration: none;
    border-radius: 12px;
}

.scdev-pbc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scdev-pbc-img-placeholder {
    width: 100%;
    height: 100%;
}

/* Dark overlay + title on image */
.scdev-pbc-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 12px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    text-align: center;
}

.scdev-pbc-title {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.3;
    color: #fffacd !important;
    /* light yellow, overrides theme */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.scdev-pbc-title-standalone {
    text-align: center;
    margin: 8px 0;
}

.scdev-pbc-title-standalone a {
    color: inherit;
    text-decoration: none;
}

.scdev-pbc-title-standalone a:hover {
    text-decoration: underline;
}

.scdev-pbc-meta {
    font-size: 0.9em;
    padding: 6px 10px 10px;
}

.scdev-pbc-slider .scdev-pbc-meta {
    color: #4b5563;
    padding: 6px 40px 15px;
}

.scdev-pbc-slider .scdev-pbc-excerpt {
    color: #4b5563 !important;
    font-weight: normal;
}

.scdev-pbc-slider .scdev-pbc-title-standalone {
    padding: 0 40px !important;
}

.scdev-pbc-prev {
    left: 8px;
}

.scdev-pbc-next {
    right: 8px;
}

.scdev-pbc-arrow:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.dark-mode .scdev-pbc-slider {
    background: #1e1e1e;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .scdev-pbc-slider .scdev-pbc-meta {
    color: #d1d5db;
}

body.dark-mode .scdev-pbc-slider .scdev-pbc-excerpt {
    color: #d1d5db !important;
}

@media (prefers-color-scheme: dark) {
    html:not(.light-mode) body:not(.light-mode) .scdev-pbc-slider .scdev-pbc-meta {
        color: #d1d5db;
    }

    html:not(.light-mode) body:not(.light-mode) .scdev-pbc-slider .scdev-pbc-excerpt {
        color: #d1d5db !important;
    }
}

body.dark-mode .scdev-pbc-arrow {
    color: #e0e0e0;
}

/* Image caption overlay */
.scdev-image-has-overlay {
    position: relative;
}

.scdev-image-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
    text-align: center;
}

.scdev-image-caption-top {
    top: 0;
    bottom: auto;
}

.scdev-image-caption-bottom {
    bottom: 0;
}

.scdev-image-caption-center {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

@media (max-width: 640px) {

    .scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-2 .scdev-image-gallery-direct,
    .scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-direct,
    .scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-4 .scdev-image-gallery-direct,
    .scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-direct,
    .scdev-image-gallery-group,
    .scdev-image-gallery-group.is-reverse {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1,
    .scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1,
    .scdev-image-gallery-group-count-3.is-reverse .scdev-image-gallery-item-1,
    .scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-item-3 {
        grid-column: auto;
        grid-row: auto;
    }

    .scdev-image-gallery-item {
        min-height: 0;
        height: var(--scdev-gallery-tile-height);
    }

    .scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery,
    .scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-groups,
    .scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-group {
        width: 100%;
        justify-content: center;
    }

    .scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-item:not(.scdev-image-caption-outside),
    .scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1:not(.scdev-image-caption-outside),
    .scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-item-3:not(.scdev-image-caption-outside),
    .scdev-image-has-ratio-size .scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1:not(.scdev-image-caption-outside) {
        width: min(var(--scdev-gallery-item-width), 100%);
        height: var(--scdev-gallery-tile-height);
        min-height: 0;
        justify-self: center;
    }

    .scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-gallery-item.scdev-image-caption-outside,
    .scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside,
    .scdev-image-has-ratio-size.scdev-image-gallery-layout-mosaic.scdev-image-gallery-count-5 .scdev-image-gallery-item-3.scdev-image-caption-outside,
    .scdev-image-has-ratio-size .scdev-image-gallery-group-count-3 .scdev-image-gallery-item-1.scdev-image-caption-outside {
        width: min(var(--scdev-gallery-item-width), 100%);
        justify-self: center;
    }

    .scdev-image-gallery-widget.scdev-image-has-ratio-size .scdev-image-caption-outside>.scdev-image-media-frame {
        height: var(--scdev-gallery-tile-height);
    }
}

/* Social icon native colors - override theme link color */
.scdev-social-link,
.scdev-social-link:hover,
.scdev-social-link .dashicons {
    color: inherit !important;
}

/* Page Comment Widget */
.scdev-page-comment {
    max-width: 300px;
    width: 100%;
}

@media (min-width: 600px) {
    .scdev-page-comment {
        max-width: 100%;
    }
}

.scdev-pc-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scdev-pc-display {
    margin-bottom: 12px;
}

.scdev-pc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.scdev-pc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.scdev-pc-header-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.scdev-pc-author {
    font-size: 13px;
    font-weight: 600;
}

.scdev-pc-time {
    font-size: 11px;
    opacity: 0.6;
}

.scdev-pc-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 14px;
    margin-left: auto;
    padding: 0;
}

.scdev-pc-delete:hover {
    color: #e74c3c;
}

.scdev-pc-text {
    font-size: 13px;
    line-height: 1.5;
}

.scdev-pc-empty {
    font-size: 13px;
    opacity: 0.5;
    margin-bottom: 12px;
}

.scdev-pc-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scdev-pc-name,
.scdev-pc-input {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    box-sizing: border-box;
    background: transparent;
    color: inherit;
    resize: none;
}

.scdev-pc-input {
    height: 70px;
}

.scdev-pc-name:focus,
.scdev-pc-input:focus {
    outline: none;
    border-color: #3498db;
}

.scdev-pc-submit {
    align-self: flex-end;
    padding: 6px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.scdev-pc-submit:hover {
    opacity: 0.85;
}

.scdev-pc-msg {
    font-size: 12px;
    color: #e74c3c;
}

.scdev-pc-input-row {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.scdev-pc-input {
    flex: 1;
}

.scdev-pc-emojis {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
}

.scdev-pc-emoji {
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.scdev-pc-emoji:hover {
    opacity: 1;
    transform: scale(1.2);
}

.scdev-pc-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

/* ── Posts Rotator — Slider mode ── */
.scdev-rotator-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    border-radius: 8px;
}

/* Stack all slides, only show active */
.scdev-rotator-slider .scdev-rotator-item {
    display: none !important;
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

.scdev-rotator-slider .scdev-rotator-item.active {
    display: block !important;
}

.scdev-rotator-slide .scdev-rotator-image {
    width: 100%;
    overflow: hidden;
    position: relative;
    line-height: 0;
}

.scdev-rotator-slide .scdev-rotator-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.scdev-rotator-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .85);
    color: #333;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.scdev-rotator-arrow:hover {
    background: #fff;
}

.scdev-rotator-prev {
    left: 8px;
}

.scdev-rotator-next {
    right: 8px;
}

/* Trending Widget */
.scdev-trending-widget {
    font-size: 13px;
}

.scdev-trending-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f0f0;
}

.scdev-trending-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scdev-trending-item {
    display: block;
}

.scdev-trending-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: opacity .2s;
}

.scdev-trending-link:hover {
    opacity: .75;
}

.scdev-trending-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.scdev-trending-no-thumb {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    background: #667eea;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.scdev-trending-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.scdev-trending-post-title {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    word-break: break-word;
}

.scdev-trending-meta,
.scdev-trending-views {
    font-size: 11px;
    color: #999;
}

.scdev-trending-widget.scdev-trending-auto .scdev-trending-item {
    display: none;
}

.scdev-trending-widget.scdev-trending-auto .scdev-trending-item.is-active {
    display: block;
}

body.dark-mode .scdev-trending-title {
    border-bottom-color: #333;
}

body.dark-mode .scdev-trending-meta,
body.dark-mode .scdev-trending-views {
    color: #666;
}

/* Hashtags Widget */
.scdev-hashtag-widget {
    font-size: 12px;
}

.scdev-hashtag-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f0f0;
}

.scdev-hashtag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: calc(2 * (22px + 5px));
    overflow: hidden;
}

.scdev-hashtag-item {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f4ff;
    color: #667eea;
    border-radius: 20px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s, color .2s;
    line-height: 16px;
}

.scdev-hashtag-item:hover {
    background: #667eea;
    color: #fff;
}

body.dark-mode .scdev-hashtag-title {
    border-bottom-color: #333;
}

body.dark-mode .scdev-hashtag-item {
    background: #1e2a4a;
    color: #8fa8f0;
}

body.dark-mode .scdev-hashtag-item:hover {
    background: #667eea;
    color: #fff;
}

/* ── Posts By Category – Post Title ── */
.scdev-pbc-title {
    margin: 0;
    padding: 0;
    font-size: 18px !important;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    font-family: inherit;
    color: #fff;
    border: none;
    background: transparent;
    box-shadow: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.scdev-pbc-title-standalone {
    color: inherit;
    text-shadow: none !important;
    margin-bottom: 5px;
}

.scdev-pbc-title-standalone a {
    color: inherit;
    text-decoration: none;
    text-shadow: none !important;
    box-shadow: none !important;
    background: transparent !important;
    display: inline-block !important;
    padding: 0 !important;
}

body.dark-mode .scdev-pbc-title-standalone,
body.dark-mode .scdev-pbc-title-standalone a {
    color: #f3f4f6;
}