/**
 * Eight Sleep - Latest Articles Section
 * EXACT 100% replica of eightsleep.com/ae/
 * Emirates Peptides v1.0.4
 */

/* ============================================
   SECTION
   ============================================ */
.es-section {
    background: #FAF9F6;
    padding: 100px 0;
    overflow: hidden;
}

/* ============================================
   HEADER - Exact Eight Sleep
   ============================================ */
.es-header {
    padding: 0 60px 48px;
}

.es-label {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b6b6b;
    margin: 0 0 12px;
}

.es-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #000;
    margin: 0 0 16px;
}

.es-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: #6b6b6b;
    margin: 0;
    max-width: 500px;
}

/* ============================================
   CAROUSEL
   ============================================ */
.es-carousel-container {
    padding: 0 60px;
    overflow: hidden;
}

.es-carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 8px;
}

.es-carousel::-webkit-scrollbar {
    display: none;
}

/* ============================================
   CARDS - Exact Eight Sleep
   ============================================ */
.es-card {
    flex: 0 0 380px;
    scroll-snap-align: start;
}

.es-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image - 4:5 aspect ratio */
.es-card-image {
    position: relative;
    width: 100%;
    padding-bottom: 125%; /* 4:5 = 125% */
    border-radius: 16px;
    overflow: hidden;
    background: #e0e0e0;
    margin-bottom: 20px;
}

.es-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.es-card:hover .es-card-image img {
    transform: scale(1.03);
}

/* Content */
.es-card-content {
    padding: 0;
}

/* Category Pill - Eight Sleep exact style */
.es-category {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #000;
    background: transparent;
    border: 1px solid #000;
    border-radius: 100px;
    padding: 6px 14px;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}

.es-card:hover .es-category {
    background: #000;
    color: #fff;
}

/* Title */
.es-card-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #000;
    margin: 0 0 12px;
}

/* Excerpt */
.es-card-text {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: #6b6b6b;
    margin: 0;
}

/* ============================================
   NAVIGATION ARROWS - Exact Eight Sleep
   ============================================ */
.es-nav {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 32px 60px 0;
}

.es-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #d4d4d4;
    background: transparent;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.es-arrow:hover {
    border-color: #000;
    background: #000;
    color: #fff;
}

.es-arrow:active {
    transform: scale(0.95);
}

.es-arrow svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .es-card {
        flex: 0 0 320px;
    }
}

@media (max-width: 767px) {
    .es-section {
        padding: 60px 0;
    }
    
    .es-header,
    .es-carousel-container,
    .es-nav {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .es-title {
        font-size: 28px;
    }
    
    .es-subtitle {
        font-size: 16px;
    }
    
    .es-card {
        flex: 0 0 calc(100vw - 48px);
    }
    
    .es-card-title {
        font-size: 20px;
    }
    
    .es-arrow {
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   DIVI OVERRIDE - Full Width
   ============================================ */
.et_pb_section .es-section,
.et_pb_row .es-section {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}
