/* Elementor Custom Widgets Styles */

/* General */
.ecw-widget-container {
    font-family: 'Outfit', sans-serif;
    /* Example premium font */
}

/* Archive Widget */
.ecw-archive-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.ecw-archive-post {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    /* Handled by grid gap */
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    height: 100%;
}

.ecw-archive-post:hover {
    transform: translateY(-5px);
}

.ecw-archive-image {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
}

.ecw-archive-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ecw-archive-post:hover .ecw-archive-image img {
    transform: scale(1.05);
}

.ecw-archive-content {
    width: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.ecw-archive-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #9da07b;
}

.ecw-archive-title a {
    color: inherit;
    text-decoration: none;
}

.ecw-archive-excerpt {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.ecw-read-more {
    display: inline-block;
    padding: 10px 20px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    align-self: flex-start;
    transition: background 0.3s ease;
}

.ecw-read-more:hover {
    background: #9da07b;
}

/* Latest Posts Widget (Horizontal Scroll) */
.ecw-latest-posts-wrapper {
    position: relative;
    overflow: hidden;
}

.ecw-latest-posts-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: none;
    /* Firefox */
}

.ecw-latest-posts-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.ecw-latest-post-item {
    flex: 0 0 300px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ecw-latest-post-image {
    height: 200px;
    background-color: #f0f0f0;
}

.ecw-latest-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ecw-latest-post-image img.loaded {
    opacity: 1;
}

.ecw-latest-post-content {
    padding: 20px;
}

.ecw-latest-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.ecw-latest-post-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #9da07b;
}

/* Single Post Widget */
.ecw-single-banner {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background-size: cover;
    background-position: center;
}

.ecw-single-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.ecw-single-banner-content {
    position: relative;
    z-index: 1;
    padding: 50px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.ecw-single-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ecw-single-title {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.ecw-single-content {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.ecw-single-reviews {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 10px;
}

.ecw-single-reviews h3 {
    font-size: 1.5rem;
    /* Decreased size */
    margin-bottom: 20px;
}

.ecw-single-reviews a {
    color: #9da07b;
}

.ecw-single-reviews .submit {
    background-color: #9da07b !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ecw-single-reviews .submit:hover {
    background-color: #8c8f6d !important;
    /* Slightly darker for hover */
}

/* Responsive */
@media (max-width: 768px) {
    .ecw-archive-post {
        flex-direction: column;
    }

    .ecw-archive-image,
    .ecw-archive-content {
        width: 100%;
    }

    .ecw-archive-image {
        height: 250px;
    }

    .ecw-single-title {
        font-size: 2rem;
    }
}