/* 
 * Modern Tech News Home Redesign - Pastel Theme with Carousel
 * Based on Stitch design export (screen b92d0c01d72044cf98ba592c5f216ad2)
 */

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(160deg, #f0fdf4 0%, #ecfdf5 40%, #f0f9ff 100%);
    min-height: 100vh;
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
}

/* Hero Gradient */
.hero-gradient {
    background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
}

/* Navigation Link */
.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #1a237e;
}

/* Subscribe Button */
.btn-subscribe {
    background: linear-gradient(90deg, #4db6ac, #dce775);
    transition: transform 0.2s ease;
}

.btn-subscribe:hover {
    transform: scale(1.02);
}

/* Carousel Container */
.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-padding: 1rem;
}

/* First and last carousel items need padding */
.carousel-container > article:first-child {
    margin-left: 0.5rem;
}

.carousel-container > article:last-child {
    margin-right: 0.5rem;
}

/* Glow Button */
.glow-button {
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.3);
}

/* Card Innovation Hover Effect */
.card-innovation {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-innovation:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* Tag Colors */
.tag-agritech {
    background-color: #fee2e2;
    color: #dc2626;
}

.tag-biotech {
    background-color: #fce7f3;
    color: #db2777;
}

.tag-quantum {
    background-color: #ffedd5;
    color: #ea580c;
}

.tag-ecotech {
    background-color: #ccfbf1;
    color: #0d9488;
}

.tag-ai {
    background-color: #fce7f3;
    color: #db2777;
}

.tag-cleanenergy {
    background-color: #ccfbf1;
    color: #0d9488;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 188, 212, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 188, 212, 0.8);
}

/* Selection */
::selection {
    background: rgba(0, 188, 212, 0.3);
    color: #0f172a;
}

/* Focus States */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #00bcd4;
    outline-offset: 2px;
}

/* Hero entrance animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-description {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-newsletter {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-visual {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Article Cards Animation */
.glass-card {
    animation: fadeInUp 0.5s ease-out forwards;
}

.glass-card:nth-child(1) { animation-delay: 0s; }
.glass-card:nth-child(2) { animation-delay: 0.1s; }
.glass-card:nth-child(3) { animation-delay: 0.2s; }
.glass-card:nth-child(4) { animation-delay: 0.3s; }
.glass-card:nth-child(5) { animation-delay: 0.4s; }
.glass-card:nth-child(6) { animation-delay: 0.5s; }
.glass-card:nth-child(7) { animation-delay: 0.6s; }
.glass-card:nth-child(8) { animation-delay: 0.7s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .glass-card {
        animation: none;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        background: linear-gradient(160deg, #f0fdf4 0%, #f0f9ff 100%);
    }
    
    .glass-card {
        border-radius: 16px;
    }
}

/* Prose Styles for Article Content */
.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #0f172a;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h2 {
    font-size: 1.5rem;
}

.prose h3 {
    font-size: 1.25rem;
}

.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.prose a {
    color: #0d9488;
    text-decoration: underline;
}

.prose a:hover {
    color: #0f766e;
}

.prose img {
    border-radius: 12px;
    margin: 2rem 0;
}

.prose ul, .prose ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose blockquote {
    border-left: 4px solid #0d9488;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #64748b;
}

.prose code {
    background: rgba(0, 188, 212, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.prose pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
}

/* Line Clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}