/* 
   Vendo.sg - Program Detail Page Styles
*/

/* Program Banner */
.program-banner {
    height: 200px;
    background-color: var(--primary-color);
    position: relative;
    overflow: hidden;
    background-image: url('../assets/Vendo-SG-Banner1.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(111, 207, 151, 0.85); /* #6FCF97 with 85% opacity */
}

/* Program Header */
.program-header {
    padding: 40px 0;
}

.program-profile {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: center; /* Ensures centered layout */
}

.program-left {
    width: 400px;
    max-width: 500px;
    flex-shrink: 0;
}

.program-image-carousel {
    width: 100%;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.program-image-large {
    width: 100%;
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    background-color: var(--white);
}

.program-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    transform: translateY(-50%);
    z-index: 2;
}

#carousel-indicators {
    display: none !important;
}

.carousel-control {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--white);
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-control:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.carousel-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-indicators {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--medium-gray);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-indicator.active {
    background-color: var(--primary-color);
}

.program-right {
    flex-grow: 1;
}

.program-info {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    max-width: 700px; /* optional: to limit how wide it stretches */
}

.program-info h1 {
    font-size: 2rem;
    margin: 0 0 15px;
    color: var(--text-color);
}

.program-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.meta-item {
    font-size: 0.9rem;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    color: var(--primary-color);
}

.vendor-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--medium-gray);
}

.vendor-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
}

.vendor-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.vendor-name {
    font-weight: 500;
}

.program-description {
    margin-bottom: 30px;
    line-height: 1.6;
}

.program-actions {
    display: flex;
    gap: 15px;
}

/* Category Tags */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.category-tag {
    display: inline-block;
    background-color: rgba(111, 157, 215, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* Related Programs */
.related-programs {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    grid-column: 1 / -1;
    text-align: center;
    color: var(--dark-gray);
}

.loading-indicator i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .program-profile {
        flex-direction: column;
    }
    
    .program-left {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .program-image-large {
        width: 100%;
        max-width: 500px;
        height: auto;
}

@media (max-width: 768px) {
    .program-info h1 {
        font-size: 1.5rem;
    }
    
    .program-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .program-image-large {
        width: 100%;
    }
    
    .program-info {
        padding: 20px;
    }
    .carousel-control {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

.program-description .short-text,
.program-description .full-text {
    display: inline;
}

#program-description .read-more-toggle {
    display: inline-block;
    margin-top: 8px;
    font-weight: 500;
    color: var(--primary-color); /* or any other color you want */
    cursor: pointer;
    text-decoration: underline;  /* ✅ ensures underline */
}

#program-description .short-text,
#program-description .full-text {
    display: inline;
}