/* Modern Article and Advertisement Design */

/* Section Container */
.cup-section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Articles Section */
.cup-articles-section {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Article Container */
.modern-article-container {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
    border: 1px solid rgba(107, 114, 128, 0.1);
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(107, 114, 128, 0.05);
}

.modern-article-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(107, 114, 128, 0.02) 0%, 
        rgba(75, 85, 99, 0.02) 50%,
        rgba(55, 65, 81, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.modern-article-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        transparent 0%, 
        rgba(107, 114, 128, 0.05) 50%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.modern-article-container:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(107, 114, 128, 0.1),
        0 0 40px rgba(107, 114, 128, 0.15);
}

.modern-article-container:hover::before {
    opacity: 1;
}

.modern-article-container:hover::after {
    opacity: 1;
}

/* Article Media Container */
.modern-article-media {
    position: relative;
    overflow: hidden;
    height: 220px;
    border-radius: 16px 16px 0 0;
}

.modern-article-media::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.modern-article-media::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
    pointer-events: none;
}

.modern-article-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.modern-article-container:hover .modern-article-media img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.05);
}

.modern-article-container:hover .modern-article-media::before {
    opacity: 1;
}

/* Play button overlay for video-like content */
.modern-article-media .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
    backdrop-filter: blur(5px);
}

.modern-article-media .play-overlay::before {
    content: '▶';
    font-size: 20px;
    color: #667eea;
    margin-left: 3px;
}

.modern-article-container:hover .modern-article-media .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Article Content */
.modern-article-content {
    padding: 1.75rem 1.5rem 1.5rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 1) 100%);
    backdrop-filter: blur(10px);
}

.modern-article-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(107, 114, 128, 0.2) 50%, 
        transparent 100%);
}

.modern-article-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.3;
    color: #111827;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    background: linear-gradient(135deg, #374151 0%, #111827 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modern-article-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.modern-article-title a:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Article Meta Information */
.modern-article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.modern-article-category {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(75, 85, 99, 0.3);
    position: relative;
    overflow: hidden;
}

.modern-article-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.modern-article-container:hover .modern-article-category::before {
    left: 100%;
}

.modern-article-date {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
    background: #f9fafb;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.modern-article-date::before {
    content: "📅";
    font-size: 0.875rem;
}

/* Article Excerpt */
.modern-article-excerpt {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1rem;
    position: relative;
}

.modern-article-excerpt::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 3rem;
    height: 1.5rem;
    background: linear-gradient(90deg, transparent, white);
}

/* Read More Button */
.modern-article-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(75, 85, 99, 0.3);
    position: relative;
    overflow: hidden;
}

.modern-article-read-more::after {
    content: "→";
    transition: transform 0.3s ease;
    font-weight: 700;
}

.modern-article-read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.modern-article-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 85, 99, 0.4);
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.modern-article-read-more:hover::before {
    left: 100%;
}

.modern-article-read-more:hover::after {
    transform: translateX(4px);
}

/* Advertisement Container */
.modern-advertisement-container {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0;
    position: relative;
    box-shadow: 0 4px 20px rgba(75, 85, 99, 0.2);
    transition: all 0.3s ease;
}

.modern-advertisement-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(75, 85, 99, 0.3);
}

/* Advertisement Content */
.modern-advertisement-content {
    padding: 1.5rem;
    text-align: center;
    color: white;
}

/* Advertisement Label */
.modern-advertisement-label {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: inline-block;
}

/* Advertisement Partner Name */
.modern-advertisement-partner-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Advertisement Description */
.modern-advertisement-description {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Advertisement CTA Button */
.modern-advertisement-cta {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.modern-advertisement-cta:hover {
    background: white;
    color: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Grid Layout for Articles */
.modern-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .modern-articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .modern-article-content {
        padding: 1.25rem;
    }
    
    .modern-article-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .modern-articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modern-article-media {
        height: 180px;
    }
    
    .modern-article-content {
        padding: 1.125rem;
    }
    
    .modern-article-title {
        font-size: 1.125rem;
        font-weight: 700;
    }
    
    .modern-article-excerpt {
        font-size: 1.1rem;
    }
    
    .modern-article-read-more {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .modern-article-media {
        height: 160px;
    }
    
    .modern-article-content {
        padding: 1rem;
    }
    
    .modern-article-title {
        font-size: 1rem;
    }
    
    .modern-advertisement-content {
        padding: 1.25rem;
    }
    
    .modern-advertisement-partner-name {
        font-size: 1.25rem;
    }
}

/* Loading Animation */
.modern-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Smooth Scroll Behavior */
.modern-article-container,
.modern-advertisement-container {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.modern-article-title a:focus,
.modern-article-read-more:focus,
.modern-advertisement-cta:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .modern-article-container {
        border: 2px solid #000;
    }
    
    .modern-advertisement-container {
        background: #000;
        border: 2px solid #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .modern-article-container,
    .modern-article-media img,
    .modern-article-read-more,
    .modern-advertisement-container,
    .modern-advertisement-cta {
        transition: none;
        animation: none;
    }
}

/* Additional modern effects */
.modern-article-container {
    position: relative;
}

.modern-article-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.05) 0%, rgba(75, 85, 99, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 16px;
}

.modern-article-container:hover::before {
    opacity: 1;
}

/* Glow effect on hover */
.modern-article-container:hover {
    box-shadow: 0 8px 30px rgba(107, 114, 128, 0.15);
}

/* Improved text shadows for better readability */
.modern-article-title {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Floating animation for elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-2px);
    }
}

.modern-article-container:hover .modern-article-read-more {
    animation: float 2s ease-in-out infinite;
}

/* Card decoration elements */
.modern-article-container .corner-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.modern-article-container .corner-decoration::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent #ffffff transparent transparent;
}

.modern-article-container:hover .corner-decoration {
    opacity: 1;
}

/* Reading time indicator */
.modern-article-meta .reading-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    padding: 0.25rem 0.625rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.modern-article-meta .reading-time::before {
    content: '⏱️';
    font-size: 0.75rem;
}

/* Tags section */
.modern-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
}

.modern-article-tag {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.modern-article-tag:hover {
    background: #4b5563;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

/* Card sparkle effect */
@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.modern-article-container .sparkle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: sparkle 2s infinite;
    z-index: 4;
}

.modern-article-container .sparkle:nth-child(2) {
    animation-delay: 0.5s;
    top: 30px;
    right: 30px;
}

.modern-article-container .sparkle:nth-child(3) {
    animation-delay: 1s;
    top: 25px;
    right: 25px;
}

.modern-article-container:hover .sparkle {
    animation-play-state: running;
}

/* Author avatar placeholder */
.modern-article-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(107, 114, 128, 0.1);
}

.modern-article-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.modern-article-author-name {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}