/* Content Carousel Styles for Motomo Home Page */

/* Responsive Two-Column Layout */
.home-content-wrapper {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.content-column {
    flex: 1;
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Mobile: Single column */
@media (max-width: 768px) {
    .home-content-wrapper {
        flex-direction: column;
        gap: 15px;
    }
}

/* Tablet: Still single column for better readability */
@media (max-width: 992px) {
    .home-content-wrapper {
        flex-direction: column;
        gap: 15px;
    }
}

/* Desktop: Two columns */
@media (min-width: 993px) {
    .home-content-wrapper {
        flex-direction: row;
    }
}

.content-carousel {
    margin-bottom: 30px;
    border: 1px solid #805b5b;
    border-radius: 8px;
    padding: 15px;
    /* Clear floats to prevent layout issues */
    overflow: hidden;

	background: var(--animated-gradient);
	border-radius: 4px;
	background-size: 1800% 1800%;
	animation: gradientAnimation 5s ease infinite;
	color: white;
	
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.carousel-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.carousel-btn {
    background: #2d3748;
    color: white;
    border: 1px solid #4a5568;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 30px;
}

.carousel-btn:hover:not(:disabled) {
    background: #4a5568;
    transform: translateY(-1px);
}

.carousel-btn:disabled,
.carousel-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.shuffle-btn {
    font-size: 16px;
    padding: 5px 8px;
}

.shuffle-btn:hover:not(:disabled) {
    background: #38a169;
}

.carousel-info {
    color: #a0aec0;
    font-size: 12px;
    white-space: nowrap;
}

.carousel-content {
    transition: opacity 0.3s ease;
    min-height: 200px; /* Prevent layout shift during loading */
    /* Clear any inherited float styles */
    clear: both;
    overflow: hidden;
}

.carousel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    margin-bottom: 8px;
    border: 1px solid #2d3748;
    border-radius: 6px;
    background: rgba(45, 55, 72, 0.1);
    transition: all 0.2s ease;
    /* Override float styles from universal CSS */
    clear: both;
    overflow: hidden;
}

.carousel-item:last-child {
    margin-bottom: 0;
}

.carousel-item:hover {
    background-color: rgba(45, 55, 72, 0.25);
    border-color: #4a5568;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Fix the titleAuthor layout inside carousel */
.carousel-item .titleAuthor {
    float: none !important;
    width: auto !important;
    background: transparent !important;
    border: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1;
}

.carousel-grade {
    flex-shrink: 0;
    margin-left: 15px;
}

/* Fix the review/grade styling inside carousel */
.carousel-item .project-list.review {
    float: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    font-size: 18px !important;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
	color: var(--chancered);
}

.carousel-loading {
    text-align: center;
    padding: 40px;
    color: #a0aec0;
    font-style: italic;
}

.carousel-error {
    text-align: center;
    padding: 20px;
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(229, 62, 62, 0.3);
}

/* Animation for content transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.carousel-content {
    animation: fadeIn 0.3s ease when loaded;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .carousel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .carousel-controls {
        align-self: stretch;
        justify-content: center;
    }
    
    .carousel-btn {
        flex: 1;
        max-width: 60px;
    }
    
    .carousel-info {
        flex: 2;
        text-align: center;
    }
    
    .carousel-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .carousel-grade {
        margin-left: 0;
        align-self: flex-end;
    }
}

/* Enhanced button states */
.carousel-btn:active:not(:disabled) {
    transform: translateY(0);
    background: #1a202c;
}

/* Loading state improvements */
.carousel-content[data-loading="true"] {
    pointer-events: none;
}

.carousel-content[data-loading="true"] .carousel-item {
    opacity: 0.6;
}


.project-list .review .noGrade {
	border: red;
}

.project-list .badReview {
	color: #b91850;
}

.project-list .goodReview {
	color: seagreen;
}

.project-list .titleAuthor .title {
	font-size: 20px;
}

.project-list .titleAuthor a {
	color: var(--chancered);
}


.project-list {
	padding: 10px;
}

.project-list .subtitle {
	font-style: italic;
}

.project-list h2 {
	font-size: 24px;
	font-weight: bold;
}

.project-list .titleAuthor {
	border: 1px solid #d3d3d3;
	padding: 10px;
	background-color: #ececec;
	height: 80px;
	margin-top: 15px;
	color: white;
	float: left;
	width: 81%;
}

.project-list .review {
	font-size: 38px;
	text-align: center;
	border: 1px solid #d3d3d3;
	padding: 10px;
	background-color: #ececec;
	height: 80px;
	margin-top: 15px;
	float: right;
	width: 18%;
	color: #482305;
	background: #2e302e;
}

.project-list .titleAuthor .desc {
	font-size: 16px;
	font-weight: normal;
	font-style: italic;
}
