/* Custom Styles for InsightArticles */

/* Base Styles */
body {
    scroll-behavior: smooth;
}

/* Navigation */
header.scrolled {
    @apply shadow-md;
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.logo{
    width: 100%;
    height: 100%;
}
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Card Animations */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
}

/* Image Hover Effects */
img.transition-transform {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Styles */
.btn-primary {
    @apply bg-primary text-white font-medium py-2 px-6 rounded-full hover:bg-primary/90 transition-colors shadow-md hover:shadow-lg transform hover:-translate-y-0.5 transition-transform;
}

.btn-secondary {
    @apply bg-white text-primary border border-primary font-medium py-2 px-6 rounded-full hover:bg-primary/5 transition-colors;
}

/* Form Inputs */
.form-input {
    @apply w-full px-4 py-3 rounded-full border border-gray-200 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition-all;
}

/* Category Badges */
.category-badge {
    @apply text-xs font-medium px-3 py-1 rounded-full;
}

/* Article Card Styles */
.article-card {
    @apply bg-white rounded-xl shadow-md overflow-hidden card-hover;
}

.article-card__image {
    @apply h-56 overflow-hidden;
}

.article-card__content {
    @apply p-6;
}

.article-card__meta {
    @apply flex items-center mb-3;
}

.article-card__title {
    @apply text-xl font-bold mb-2 hover:text-primary transition-colors;
}

.article-card__excerpt {
    @apply text-gray-600 mb-4 line-clamp-3;
}

.article-card__footer {
    @apply flex items-center justify-between;
}

/* Trending Article Styles */
.trending-article {
    @apply flex flex-col md:flex-row gap-6 bg-white rounded-xl shadow-sm overflow-hidden card-hover;
}

.trending-article__image {
    @apply w-full md:w-1/3 h-60 md:h-auto overflow-hidden;
}

.trending-article__content {
    @apply w-full md:w-2/3 p-6 flex flex-col justify-center;
}

/* Category Card Styles */
.category-card {
    @apply bg-white p-6 rounded-xl shadow-md text-center card-hover flex flex-col items-center justify-center;
}

.category-card__icon {
    @apply w-16 h-16 rounded-full flex items-center justify-center text-2xl mb-4;
}

/* Newsletter Section */
.newsletter-form {
    @apply flex flex-col sm:flex-row gap-3 max-w-xl mx-auto;
}

/* Footer Styles */
.footer-link {
    @apply text-gray-400 hover:text-white transition-colors;
}

.footer-social-link {
    @apply text-gray-400 hover:text-white transition-colors text-xl;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        @apply px-4;
    }

    .grid-cols-3 {
        @apply grid-cols-1 md:grid-cols-2;
    }

    .trending-article {
        @apply flex-col;
    }

    .trending-article__image {
        @apply w-full h-56;
    }
}

/* Loading Animation */
.loader {
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    border-top: 3px solid #3b82f6;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card-hover {
        @apply border-2 border-current;
    }

    .btn-primary,
    .btn-secondary {
        @apply border-2 border-current;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
