/* Container */
.mygithub-shortcode-wrapper {
    position: relative;
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    width: 100%; /* Ensure full width */
    border: none !important; /* Prevent unwanted borders */
    outline: none !important;
}

/* Grid Mode */
.mygithub-grid-mode {
    display: grid !important;
    gap: 20px !important;
    grid-template-columns: repeat(3, 1fr); /* Default fallback */
    width: 100% !important;
}

@media (max-width: 992px) {
    .mygithub-grid-mode {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

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

/* Carousel Mode */
.mygithub-carousel-mode {
    position: relative;
    overflow: hidden;
    padding: 10px 5px; /* Space for shadow */
    border: none !important;
}

.mygithub-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding-bottom: 20px; /* Hide scrollbar visual if needed, though we hide it below */
    scrollbar-width: none; /* Firefox */
}

.mygithub-carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.mygithub-carousel-track .mygithub-card {
    flex: 0 0 300px; /* Fixed width cards in carousel */
    max-width: 80%;
}

/* Card Styles */
.mygithub-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
}

.mygithub-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.mygithub-card-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.mygithub-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mygithub-card:hover .mygithub-card-image img {
    transform: scale(1.05);
}

.mygithub-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mygithub-card-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 700;
}

.mygithub-card-title a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.2s;
}

.mygithub-card-title a:hover {
    color: #0073aa;
}

.mygithub-card-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 12px;
}

.mygithub-card-excerpt {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.6;
}

.mygithub-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.mygithub-meta-item i {
    margin-right: 5px;
}

.mygithub-card-actions {
    margin-top: auto;
}

.mygithub-btn-details {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.mygithub-btn-details:hover {
    background-color: #005177;
    color: #fff;
}

/* Carousel Controls */
.mygithub-carousel-prev,
.mygithub-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    min-width: 45px; /* Prevent shrinking */
    min-height: 45px;
    border-radius: 50%;
    background: #fff;
    border: var(--mygithub-arrow-border-width, 1px) solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.2s;
    box-sizing: border-box; /* Revert to border-box to control total size */
    padding: 0; /* Ensure no padding adds size */
}

.mygithub-carousel-prev:hover,
.mygithub-carousel-next:hover {
    background: var(--mygithub-arrow-hover-bg, #0073aa) !important;
    color: #fff !important;
    border-color: var(--mygithub-arrow-hover-border, #0073aa) !important;
}

.mygithub-carousel-prev {
    left: -15px;
}

.mygithub-carousel-next {
    right: -15px;
}

/* Dots */
.mygithub-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.mygithub-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.2s;
}

.mygithub-carousel-dot.active {
    background: #0073aa;
}
