/* Concept Carousel Styles */

/* Import local fonts for carousel cards */
@font-face {
    font-family: 'Chelsea Market';
    src: url('../fonts/ChelseaMarket-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

.concept-carousel-wrapper {
    margin: 2rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Header Section */
.concept-carousel-header {
    background: #fff;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.concept-carousel-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-color, #333);
}

.concept-carousel-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color-light, #666);
    margin: 0 0 1rem 0;
}

.concept-carousel-link {
    margin: 0;
}

.concept-carousel-link .concept-page-link {
    display: inline-block;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
    background-color: var(--primary-color);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-radius: 8px;
    color: white;
    font-size: 1.2rem;
}

.concept-carousel-link .concept-page-link:hover {
    text-decoration: underline;
    color: var(--primary-color-dark, #005a87);
}

/* Navigation Buttons - Above carousel */
.concept-carousel-navigation {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color-light, #666);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    order: 1;
}

/* Carousel Container - Mobile First (Horizontal Scroll) */
/* Full width: break out of parent container */
.concept-carousel-container {
    position: relative;
    overflow: visible;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    order: 2;
}

.concept-carousel-items {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.5rem 1rem;
    scroll-padding-left: 1rem;
    scroll-padding-right: 1rem;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Center items when they all fit */
.concept-carousel-items.all-fit {
    justify-content: center;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.concept-carousel-items::-webkit-scrollbar {
    display: none;
}

/* Individual Carousel Item */
.concept-carousel-item {
    flex: 0 0 320px;
    background: #fff;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    overflow: visible;
    scroll-snap-align: start;
    min-height: 400px;
    width: 320px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
}

/* Type Variants */

/* Highlighted Green */
.concept-carousel-item.type-highlighted-green {
    border: 1px solid #556B2F;
    background: #556B2F;
}

.concept-carousel-item.type-highlighted-green .item-header,
.concept-carousel-item.type-highlighted-green .item-body {
    color: #fff;
}

.concept-carousel-item.type-highlighted-green .item-button {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.concept-carousel-item.type-highlighted-green .item-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Highlighted Blue */
.concept-carousel-item.type-highlighted-blue {
    border: 1px solid #0073aa;
    background: #0073aa;
}

.concept-carousel-item.type-highlighted-blue .item-header,
.concept-carousel-item.type-highlighted-blue .item-body {
    color: #fff;
}

.concept-carousel-item.type-highlighted-blue .item-button {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.concept-carousel-item.type-highlighted-blue .item-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Dark */
.concept-carousel-item.type-dark {
    border: 1px solid #333;
    background: #333;
}

.concept-carousel-item.type-dark .item-header,
.concept-carousel-item.type-dark .item-body {
    color: #fff;
}

.concept-carousel-item.type-dark .item-button {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.concept-carousel-item.type-dark .item-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Auto Title-Only Styling - When card has only title (no image, body text, or button) */
.concept-carousel-item.content-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.concept-carousel-item.content-minimal .item-image {
    display: none;
}

.concept-carousel-item.content-minimal .item-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 0;
}

.concept-carousel-item.content-minimal .item-header {
    font-size: 2.5rem;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    font-family: 'Chelsea Market', cursive;
    letter-spacing: 0.15rem;
}

.concept-carousel-item.content-minimal .item-body,
.concept-carousel-item.content-minimal .item-button {
    display: none;
}

/* Auto Button-Only Styling - When card has only button (no image, title, or body text) */
.concept-carousel-item.content-button-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.concept-carousel-item.content-button-only .item-image {
    display: none;
}

.concept-carousel-item.content-button-only .item-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 0;
}

.concept-carousel-item.content-button-only .item-header,
.concept-carousel-item.content-button-only .item-body {
    display: none;
}

.concept-carousel-item.content-button-only .item-button {
    font-size: 1.5rem;
    padding: 1.5rem 3rem;
    margin: 0;
}

/* Item Image */
.item-image {
    width: 100%;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* Image Placement Variants */

/* Full: Image covers entire card as background */
.placement-full {
    position: relative;
}

.placement-full .item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.placement-full .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.placement-full .item-content {
    position: relative;
    z-index: 1;
    margin: auto 0 0 0;
}

.placement-full.type-highlighted-green .item-content {
    background: rgba(85, 107, 47, 0.95);
}

.placement-full.type-highlighted-blue .item-content {
    background: rgba(0, 115, 170, 0.95);
}

.placement-full.type-dark .item-content {
    background: rgba(51, 51, 51, 0.95);
}

/* Top: Image at top with fixed aspect ratio */
.placement-top {
    display: flex;
    flex-direction: column;
}

.placement-top .item-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.placement-top .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.placement-top .item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Item Content */
.item-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    border-radius: 8px;
}

.item-header {
    font-size: 1.2rem;
    line-height: inherit;
    font-weight: 700;
    margin: 0;
    color: var(--text-color, #333);
    font-family: 'Chelsea Market', cursive;
    letter-spacing: 0.08rem;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.item-header.font-loaded {
    opacity: 1;
}

.item-header a {
    color: inherit;
    text-decoration: none;
}

.item-header a:hover {
    color: var(--primary-color, #0073aa);
}

.item-image a {
    display: block;
}

.item-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color-light, #666);
    margin: 0;
}

.item-button {
    display: block;
    padding: 0.6rem 1.2rem;
    background: var(--primary-color, #0073aa);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: background 0.2s ease;
    border: 2px solid transparent;
    margin-top: auto;
    font-family: 'Open Sans', sans-serif;
}

.item-button:hover {
    background: var(--primary-color-dark, #005a87);
}

/* Navigation Buttons */
.carousel-nav-button {
    background: transparent;
    color: #000;
    border: none;
    border-radius: 0;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    padding: 0;
}

.carousel-nav-button:hover:not(:disabled) {
    opacity: 0.6;
}

.carousel-nav-button:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* Hide navigation when not needed */
.concept-carousel-navigation.hidden {
    display: none;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .concept-carousel-header {
        max-width: 800px;
        margin-bottom: 1.5rem;
    }

    .concept-carousel-items {
        gap: 1.5rem;
        padding: 0.5rem 2rem;
        scroll-padding-left: 2rem;
        scroll-padding-right: 2rem;
    }

    .concept-carousel-item {
        width: 320px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .concept-carousel-item {
        width: 320px;
    }
}

/* Error State */
.concept-carousel.error {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
}

.concept-carousel.error p {
    margin: 0;
    color: #856404;
}
