/* What's New Carousel & Grid Styles */

/* Base Carousel Styles */
.whatsnew-carousel-wrapper {
    position: relative;
    margin: 20px 0;
    overflow: hidden;
}

.whatsnew-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 50%; /* Default: 2 slides visible */
    padding: 0 30px;
    box-sizing: border-box;
}

.carousel-slide .slide-content {
	position: relative;
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-blend-mode: overlay;
    background-color: #000000a8;
}

.carousel-slide .slide-content:hover {
    transform: translateY(-5px);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: flex-start;
    padding: 30px;
}

.slide-text {
    color: white;
    width: 100%;
	padding: 30px;
}

.slide-title {
	color: #dd4827 !important;
    font-family: "DIN Light" !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 60px !important;
    line-height: var(--awb-title-line-height);
    letter-spacing: var(--awb-title-letter-spacing);
    text-transform: uppercase !important;
}

.slide-excerpt {
    font-size: 24px !important;
    line-height: 1.4;
	font-family: "DIN Light" !important;
    margin: 0 0 20px 0!important;


}

.slide-date {
    font-size: 12px;
    opacity: 0.7;
    display: block;
    margin-bottom: 10px;
}

.slide-button {
    display: inline-block;
    padding: 8px 20px;
    background-color: #dd4827;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.slide-button:hover {
    background-color: #c23e22;
    color: white;
    text-decoration: none;
	border: none;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 98%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
	
}

.carousel-prev,
.carousel-next {
    background: #00000000;
    font-size: 70px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
	border-color: #00000000;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: #00000000;
    transform: scale(1.1);
	border: none;
	border-color: #00000000;
}

.carousel-prev {
    margin-left: -15px;
}

.carousel-next {
    margin-right: -10px;
}
.carousel-prev:focus, .carousel-next:focus, .carousel-dot:focus {
    outline: none !important;
}

/* Dark Theme Triangle Arrows */

.custom-icon-arrow-left-2:before, .custom-icon-arrow-right-2:before{
	color:#DD4827;
}

/* .theme-dark .carousel-prev::before,
.theme-dark .carousel-next::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
}

.theme-dark .carousel-prev::before {
    border-right: 8px solid white;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    margin-right: 2px;
}

.theme-dark .carousel-next::before {
    border-left: 8px solid white;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    margin-left: 2px;
}

.theme-dark .carousel-prev i,
.theme-dark .carousel-next i {
    display: none;
} */

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.carousel-dot {
    width: 20px;
    height: 20px;
/*     border-radius: 50%; */
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
	border-color: #DD4827;
}

.carousel-dot.active {
    background: #dd4827;
}

/* Theme Variations */
.theme-dark {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.theme-dark .carousel-dot {
    background: rgba(255,255,255,0.3);
}

.theme-dark .carousel-dot.active {
    background: #dd4827;
}

.theme-light {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

/* Grid Styles */
.whatsnew-grid {
    display: grid;
    gap: 30px;
    margin: 20px 0;
}

.whatsnew-grid.columns-1 {
    grid-template-columns: 1fr;
}

.whatsnew-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.whatsnew-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.whatsnew-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-item {
    background: white;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.grid-image {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.grid-content {
    padding: 20px;
}

.grid-title {
    color: var(--link_color); /* Assumes --link_color is defined elsewhere in your theme */
    font-family: "DIN Light" !important; /* Overriding fonts; confirm this font is loaded */
    font-weight: 400 !important;
    font-style:normal !important;
    font-size: 60px !important; /* Very large font size for desktop; consider adjusting */
    line-height: var(--awb-title-line-height); /* Assumes --awb-title-line-height is defined */
    letter-spacing: var(--awb-title-letter-spacing); /* Assumes --awb-title-letter-spacing is defined */
    text-transform: uppercase !important;
	color: #dd4827 !important;
    clear: right;
}

.grid-excerpt {
    font-size: 0.95em;
    line-height: 1.6;
    color: #666;
    margin: 0 0 20px 0;
    flex-grow: 1; /* Allows excerpt to expand */
}

.grid-button {
    display: inline-block;
    background: #fff;
    color: #000;
    padding: 10px 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    align-self: flex-start; /* Aligns button to the left */
    border: 2px solid #000;
}

.grid-button:hover {
    background-color: #c23e22;
    color: white;
    text-decoration: none;
}

/* Pagination */
.whatsnew-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination-link {
    padding: 8px 12px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination-link:hover,
.pagination-link.current {
    background: #dd4827;
    color: white;
    text-decoration: none;
}

/* Responsive Design */

/* Tablet (991px and below) */
@media screen and (max-width: 991px) {
    .carousel-slide {
        flex: 0 0 100%; /* 1 slide on tablet */
    }
    
    .whatsnew-grid.columns-3,
    .whatsnew-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slide-content,
    .grid-image {
        height: 300px;
    }
    
    .slide-title {
        font-size: 20px;
    }
    
    .grid-title {
        font-size: 18px;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .carousel-prev {
        margin-left: -20px;
    }
    
    .carousel-next {
        margin-right: -20px;
    }
}

/* Mobile (767px and below) */
@media screen and (max-width: 767px) {
    .whatsnew-grid.columns-2,
    .whatsnew-grid.columns-3,
    .whatsnew-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .slide-content,
    .grid-image {
        height: 250px;
    }
    
    .slide-overlay {
        padding: 20px;
    }
    
    .slide-title {
        font-size: 18px;
    }
    
    .grid-title {
        font-size: 16px;
    }
    
    .slide-excerpt,
    .grid-excerpt {
        font-size: 13px;
    }
    
    .carousel-nav {
        display: none; /* Hide arrows on mobile, rely on touch */
    }
    
    .whatsnew-carousel-wrapper {
        margin: 10px 0;
    }
    
    .theme-dark,
    .theme-light {
        padding: 15px;
    }
    
    .grid-content {
        padding: 15px;
    }
}

/* Touch/Swipe Indicators */
.carousel-touch-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    opacity: 0.7;
}

/* Loading States */
.whatsnew-carousel.loading,
.whatsnew-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #dd4827;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility */
.carousel-slide:focus,
.grid-item:focus {
    outline: 2px solid #dd4827;
    outline-offset: 2px;
}

.carousel-prev:focus,
.carousel-next:focus,
.carousel-dot:focus {
    outline: 2px solid #dd4827;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .slide-overlay {
        background: linear-gradient(to bottom, transparent 20%, rgba(0,0,0,0.95) 100%);
    }
    
    .carousel-prev,
    .carousel-next {
        background: rgba(0,0,0,0.9);
        border: 2px solid white;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .whatsnew-carousel,
    .slide-content,
    .grid-item,
    .carousel-prev,
    .carousel-next,
    .carousel-dot,
    .slide-button,
    .grid-button {
        transition: none;
    }
}

/* Print styles */
@media print {
    .carousel-nav,
    .carousel-dots,
    .whatsnew-pagination {
        display: none;
    }
    
    .whatsnew-carousel {
        display: block;
    }
    
    .carousel-slide {
        display: block;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}