/* Promo Input Pro - Frontend Styles (News Layout) */

:root {
    --pip-primary: #dc2626; /* News red */
    --pip-text-dark: #1f2937;
    --pip-text-muted: #6b7280;
    --pip-bg-card: #ffffff;
    --pip-border: #e5e7eb;
    --pip-radius: 8px;
    --pip-transition: all 0.2s ease-in-out;
}

.pip-promo-container {
    padding: 20px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Grid Layout */
.pip-promo-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Card Styling (Horizontal) */
.pip-promo-card {
    display: flex;
    gap: 24px;
    text-decoration: none !important;
    color: inherit;
    transition: var(--pip-transition);
    align-items: flex-start;
}

/* Image Wrapper for Uniformity */
.pip-promo-image-wrapper {
    flex: 0 0 350px; /* Fixed width for image */
    height: 200px;   /* Fixed height for image */
    border-radius: var(--pip-radius);
    overflow: hidden;
    background: #f3f4f6;
}

.pip-promo-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures uniform size */
    display: block;
}

/* Content Styling */
.pip-promo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.pip-promo-title {
    margin: 0 0 12px 0;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--pip-text-dark);
}

.pip-promo-subtitle {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pip-primary); /* Red category color from image */
    text-transform: capitalize;
}

.pip-promo-description {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--pip-text-muted);
}

.pip-read-more {
    color: var(--pip-primary);
    font-weight: 600;
    cursor: pointer;
}

/* Carousel Adjustments */
.pip-promo-carousel .pip-promo-card {
    flex-direction: row; /* Make it horizontal in carousel too */
    gap: 24px;
}

.pip-promo-carousel .pip-promo-image-wrapper {
    flex: 0 0 250px; /* Slightly smaller image for carousel items */
    height: 150px;
}

/* No Promos Available */
.pip-no-promos {
    text-align: center;
    padding: 60px 20px;
    color: var(--pip-text-muted);
    font-size: 1.25rem;
    font-weight: 500;
    width: 100%;
}

/* Thumbnail Only & Horizontal Layout */
.pip-promo-thumbnail-grid {
    width: 100%;
    margin-bottom: 32px;
}

.pip-promo-card-only-thumbnail {
    display: block;
    text-decoration: none;
    border-radius: var(--pip-radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    background: #f3f4f6;
    aspect-ratio: 16/10;
}

.pip-promo-card-only-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pip-promo-card-only-thumbnail:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pip-promo-card-only-thumbnail:hover img {
    transform: scale(1.06);
}

/* Carousel support for thumbnail-only */
.pip-promo-carousel .pip-promo-card-only-thumbnail {
    aspect-ratio: 16/10;
}

/* Responsive */
@media (max-width: 768px) {
    .pip-promo-card {
        flex-direction: column;
        gap: 16px;
    }
    
    .pip-promo-image-wrapper {
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .pip-promo-title {
        font-size: 1.4rem;
    }

    .pip-promo-thumbnail-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 12px !important;
    }
}
