/* Duraamen Widgets Styles */

/* Image Box Grid */
.duraamen-image-box-grid {
    display: grid;
    gap: 30px;
}

/* Desktop Grid Classes */
.duraamen-image-box-grid.elementor-grid-desktop-1 {
    grid-template-columns: 1fr;
}

.duraamen-image-box-grid.elementor-grid-desktop-2 {
    grid-template-columns: repeat(2, 1fr);
}

.duraamen-image-box-grid.elementor-grid-desktop-3 {
    grid-template-columns: repeat(3, 1fr);
}

.duraamen-image-box-grid.elementor-grid-desktop-4 {
    grid-template-columns: repeat(4, 1fr);
}

.duraamen-image-box-grid.elementor-grid-desktop-5 {
    grid-template-columns: repeat(5, 1fr);
}

.duraamen-image-box-grid.elementor-grid-desktop-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Tablet Grid Classes */
@media (max-width: 1024px) {
    .duraamen-image-box-grid.elementor-grid-tablet-1 {
        grid-template-columns: 1fr;
    }
    
    .duraamen-image-box-grid.elementor-grid-tablet-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .duraamen-image-box-grid.elementor-grid-tablet-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .duraamen-image-box-grid.elementor-grid-tablet-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Grid Classes */
@media (max-width: 768px) {
    .duraamen-image-box-grid.elementor-grid-mobile-1 {
        grid-template-columns: 1fr;
    }
    
    .duraamen-image-box-grid.elementor-grid-mobile-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.duraamen-image-box-item {
    text-align: center;
}

.duraamen-image-box-image {
    margin-bottom: 20px;
}

.duraamen-image-box-image img {
    width: 100%;
    height: auto;
}

.duraamen-image-box-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.duraamen-image-box-description {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

.duraamen-image-box-button {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

/* Carousel Styles */
.duraamen-carousel {
    position: relative;
}

.duraamen-carousel-slide {
    text-align: center;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.duraamen-carousel .slick-slide {
    outline: none;
}

.duraamen-carousel .slick-list {
    margin: 0 -10px;
}

.duraamen-carousel .slick-slide > div {
    padding: 0 10px;
}

/* Hide default Slick arrows and show custom ones */
.duraamen-carousel .slick-prev,
.duraamen-carousel .slick-next {
    display: none !important;
}

.duraamen-carousel .slick-prev.duraamen-carousel-arrow,
.duraamen-carousel .slick-next.duraamen-carousel-arrow {
    display: flex !important;
}

.duraamen-carousel-image {
    margin-bottom: 20px;
}

.duraamen-carousel-image img {
    width: 100%;
    height: auto;
}

.duraamen-carousel-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.duraamen-carousel-description {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

.duraamen-carousel-button {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

/* Carousel Navigation */
.duraamen-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #007cba;
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
    text-indent: -9999px;
    overflow: hidden;
}

.duraamen-carousel-arrow:hover {
    background-color: #005a87;
}

.duraamen-carousel-arrow.prev {
    left: -20px;
}

.duraamen-carousel-arrow.prev::before {
    content: "‹";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    text-indent: 0;
}

.duraamen-carousel-arrow.next {
    right: -20px;
}

.duraamen-carousel-arrow.next::before {
    content: "›";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    text-indent: 0;
}

.duraamen-carousel-dots {
    text-align: center;
    margin-top: 30px;
}

.duraamen-carousel-dots .slick-dots {
    display: inline-block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.duraamen-carousel-dots .slick-dots li {
    display: inline-block;
    margin: 0 5px;
}

.duraamen-carousel-dots .slick-dots li button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: #ccc;
    cursor: pointer;
    font-size: 0;
    transition: background-color 0.3s ease;
}

.duraamen-carousel-dots .slick-dots li.slick-active button {
    background-color: #007cba;
}

/* Responsive Design */
@media (max-width: 768px) {
    .duraamen-image-box-grid.elementor-grid-2,
    .duraamen-image-box-grid.elementor-grid-3,
    .duraamen-image-box-grid.elementor-grid-4,
    .duraamen-image-box-grid.elementor-grid-6 {
        grid-template-columns: 1fr;
    }
    
    .duraamen-carousel-arrow {
        display: none;
    }
}

/* Post Query Grid Styles */
.duraamen-post-grid {
    display: grid;
    gap: 30px;
}
/* Product Line Slider rules removed per request */

/* Desktop Grid Classes */
.duraamen-post-grid.elementor-grid-desktop-1 {
    grid-template-columns: 1fr;
}

.duraamen-post-grid.elementor-grid-desktop-2 {
    grid-template-columns: repeat(2, 1fr);
}

.duraamen-post-grid.elementor-grid-desktop-3 {
    grid-template-columns: repeat(3, 1fr);
}

.duraamen-post-grid.elementor-grid-desktop-4 {
    grid-template-columns: repeat(4, 1fr);
}

.duraamen-post-grid.elementor-grid-desktop-5 {
    grid-template-columns: repeat(5, 1fr);
}

.duraamen-post-grid.elementor-grid-desktop-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Tablet Grid Classes */
@media (max-width: 1024px) {
    .duraamen-post-grid.elementor-grid-tablet-1 {
        grid-template-columns: 1fr;
    }
    
    .duraamen-post-grid.elementor-grid-tablet-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .duraamen-post-grid.elementor-grid-tablet-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .duraamen-post-grid.elementor-grid-tablet-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Grid Classes */
@media (max-width: 768px) {
    .duraamen-post-grid.elementor-grid-mobile-1 {
        grid-template-columns: 1fr;
    }
    
    .duraamen-post-grid.elementor-grid-mobile-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.duraamen-post-item {
    display: flex;
    flex-direction: column;
}

.duraamen-post-image {
    margin-bottom: 15px;
}

.duraamen-post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.duraamen-post-image a {
    display: block;
    text-decoration: none;
}

.duraamen-post-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.duraamen-post-title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.duraamen-post-title a:hover {
    color: #007cba;
}

.duraamen-post-description {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

.duraamen-post-date {
    font-size: 14px;
    color: #999;
}

@media (max-width: 480px) {
    .duraamen-image-box-title {
        font-size: 20px;
    }
    
    .duraamen-carousel-title {
        font-size: 20px;
    }
    
    .duraamen-image-box-description,
    .duraamen-carousel-description {
        font-size: 14px;
    }

    .duraamen-post-title {
        font-size: 18px;
    }
    
    .duraamen-post-description {
        font-size: 14px;
    }
}

/* YouTube Videos Widget Styles */
.duraamen-youtube-videos {
    width: 100%;
}

.duraamen-youtube-main-thumbnail-wrapper {
    width: 100%;
    margin-bottom: 20px;
}

.duraamen-youtube-main-thumbnail {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #000;
}

.duraamen-youtube-main-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.duraamen-youtube-main-thumbnail:hover img {
    transform: scale(1.05);
}

.duraamen-youtube-thumbnails {
    display: grid;
    gap: 10px;
    width: 100%;
}

.duraamen-youtube-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #000;
}

.duraamen-youtube-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.duraamen-youtube-thumbnail:hover img {
    transform: scale(1.05);
}

.duraamen-youtube-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.duraamen-youtube-thumbnail:hover .duraamen-youtube-thumbnail-overlay {
    background: rgba(0, 0, 0, 0.4);
}

/* YouTube Video Info (Title, Subtitle, Part Number) */
.duraamen-youtube-video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    z-index: 15;
    pointer-events: none;
}

.duraamen-youtube-part-number {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.duraamen-youtube-video-title {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.duraamen-youtube-video-subtitle {
    display: block;
    font-weight: bold;
    margin-bottom: 3px;
}

.duraamen-youtube-video-full-title {
    display: block;
    font-size: 0.9em;
    opacity: 0.9;
}

/* Main thumbnail video info */
.duraamen-youtube-main-thumbnail .duraamen-youtube-video-info {
    padding: 20px;
}

.duraamen-youtube-main-thumbnail .duraamen-youtube-part-number {
    font-size: 18px;
    margin-bottom: 8px;
}

.duraamen-youtube-main-thumbnail .duraamen-youtube-video-title {
    font-size: 18px;
}

.duraamen-youtube-main-thumbnail .duraamen-youtube-video-subtitle {
    font-size: 20px;
    margin-bottom: 5px;
}

/* Small thumbnail video info */
.duraamen-youtube-thumbnail .duraamen-youtube-video-info {
    padding: 10px;
}

.duraamen-youtube-thumbnail .duraamen-youtube-part-number {
    font-size: 12px;
    margin-bottom: 3px;
}

.duraamen-youtube-thumbnail .duraamen-youtube-video-title {
    font-size: 13px;
}

.duraamen-youtube-thumbnail .duraamen-youtube-video-subtitle {
    font-size: 14px;
    margin-bottom: 2px;
}

/* Responsive YouTube Videos */
@media (max-width: 768px) {
    .duraamen-youtube-thumbnails {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .duraamen-youtube-popup {
        padding: 10px;
    }
    
    .duraamen-youtube-popup-close {
        top: -35px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .duraamen-youtube-thumbnails {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    
    .duraamen-youtube-popup-content {
        max-width: 100%;
    }
    
    .duraamen-youtube-popup-close {
        top: -30px;
        font-size: 24px;
        width: 30px;
        height: 30px;
    }
    
    .duraamen-youtube-popup-close svg {
        width: 20px;
        height: 20px;
    }
}

/* Parallax Effect Styles */
.duraamen-parallax-wrapper {
    overflow: hidden;
    position: relative;
    display: block;
    width: 100%;
}

.duraamen-parallax-wrapper .duraamen-parallax-img {
    will-change: transform;
    transition: transform 0.1s ease-out;
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    max-width: 100%;
    /* Prevent image from affecting layout */
    vertical-align: top;
}

/* Ensure wrapper maintains its natural height */
.duraamen-parallax-wrapper::after {
    content: '';
    display: table;
    clear: both;
}

/* Prevent parallax on mobile devices for better performance */
@media (max-width: 768px) {
    .duraamen-parallax-wrapper .duraamen-parallax-img {
        transform: none !important;
    }
}

/* YouTube Video Overlay and Play Icon */
.duraamen-youtube-overlay-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.duraamen-youtube-overlay-icon:hover {
    transform: scale(1.1);
}

.duraamen-youtube-overlay-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* YouTube Popup Modal */
.duraamen-youtube-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.duraamen-youtube-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.duraamen-youtube-popup-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    z-index: 1;
    background: transparent;
}

.duraamen-youtube-popup-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.duraamen-youtube-popup-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.duraamen-youtube-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 2;
    padding: 0;
}

.duraamen-youtube-popup-close:hover {
    transform: rotate(90deg);
    opacity: 0.8;
}

.duraamen-youtube-popup-close svg {
    width: 24px;
    height: 24px;
}