/* File: css/components/skeleton.css */
/*
 * ============================================
 *    SKELETON LOADING PLACEHOLDERS
 * ============================================
 *
 * Animated placeholder shapes that show while
 * content is being loaded via fetch().
 *
 * These mimic the layout of real cards so the page
 * doesn't "jump" when content loads in.
 *
 * The shimmer effect uses a CSS gradient animation
 * that slides across the placeholder — this is the
 * same technique used by Facebook, LinkedIn, YouTube,
 * and most modern web apps.
 */


/* ==========================================
   SHIMMER ANIMATION
   ========================================== */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        rgba(255, 255, 255, 0.05) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease infinite;
}

[data-theme="light"] .skeleton-shimmer {
    background: linear-gradient(
        90deg,
        #e2e8f0 25%,
        #f1f5f9 50%,
        #e2e8f0 75%
    );
    background-size: 200% 100%;
}


/* ==========================================
   SKELETON CARD (Projects / Products)
   ========================================== */
.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.skeleton-image {
    height: 200px;
    background: var(--bg-tertiary);
}

.skeleton-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.skeleton-line {
    height: 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
}

.skeleton-line--short {
    width: 40%;
}

.skeleton-line--medium {
    width: 70%;
}


/* ==========================================
   SKELETON SERVICE CARD
   ========================================== */
.skeleton-service {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.skeleton-service .skeleton-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
}

.skeleton-service .skeleton-body {
    padding: 0;
}


/* ==========================================
   SKELETON TESTIMONIAL
   ========================================== */
.skeleton-testimonial {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.skeleton-testimonial .skeleton-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}


/* ==========================================
   CONTENT EMPTY STATE
   ========================================== */
.content-empty {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-style: italic;
    grid-column: 1 / -1;
}


/* ==========================================
   CONTENT ERROR STATE
   ========================================== */
.content-error {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    grid-column: 1 / -1;
}

.content-error__icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: var(--space-md);
}

.content-error__text {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-lg);
}


/* ==========================================
   SERVICE CARD (rendered by content-loader)
   ========================================== */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
}

.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-card__icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.service-card__title {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
}

.service-card__description {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.service-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-lg) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
}

.service-card__feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-xs);
    color: var(--text-primary);
    line-height: 1.5;
}

.service-card__feature svg {
    color: var(--accent-primary);
    flex-shrink: 0;
}

.service-card__pricing {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.service-card__price-label {
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.service-card__price {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--text-heading);
}

.service-card__cta {
    align-self: flex-start;
}

/* ==========================================
   PRODUCT CARD (rendered by content-loader)
   ========================================== */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-card__image {
    height: 180px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card__category {
    font-size: var(--fs-xs);
    font-family: var(--font-mono);
    color: var(--accent-primary);
    text-transform: capitalize;
    margin-bottom: var(--space-xs);
}

.product-card__title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.product-card__description {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.product-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-md) 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.product-card__feature {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--fs-xs);
    color: var(--text-primary);
}

.product-card__feature svg {
    color: var(--accent-primary);
    flex-shrink: 0;
}

.product-card__pricing {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.product-card__price {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--text-heading);
}

.product-card__original-price {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    text-decoration: line-through;
}

.product-card__add-to-cart {
    align-self: stretch;
    justify-content: center;
}