/* CSS Custom Properties - Matching Tailwind Theme */
:root {
    /* Colors */
    --background: hsl(195, 30%, 97%);
    --foreground: hsl(200, 25%, 20%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(200, 25%, 20%);
    --primary: hsl(187, 80%, 45%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsl(195, 25%, 93%);
    --secondary-foreground: hsl(200, 25%, 25%);
    --muted: hsl(195, 20%, 94%);
    --muted-foreground: hsl(200, 15%, 50%);
    --border: hsl(195, 20%, 90%);
    --ring: hsl(187, 80%, 45%);

    /* Shadows */
    --shadow-card: 0 4px 24px -4px hsla(200, 25%, 20%, 0.08);
    --shadow-card-hover: 0 12px 40px -8px hsla(200, 25%, 20%, 0.12);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, hsl(187, 80%, 45%) 0%, hsl(187, 70%, 55%) 100%);

    /* Typography */
    --font-heading: 'Poppins', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Spacing */
    --radius: 0.75rem;
    --container-max: 1400px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

/* Utility Classes */
.text-primary {
    color: var(--primary);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

@media (min-width: 768px) {
    .header-content {
        height: 80px;
    }
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--foreground);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

/* Desktop Navigation */
.nav-desktop {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
    background-color: var(--muted);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    padding: 0.5rem;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}

.mobile-menu-btn:hover {
    color: var(--foreground);
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn .icon-close {
    display: none;
}

.mobile-menu-btn.active .icon-menu {
    display: none;
}

.mobile-menu-btn.active .icon-close {
    display: block;
}

/* Mobile Navigation */
.nav-mobile {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

.nav-mobile.active {
    display: block;
}

@media (min-width: 768px) {
    .nav-mobile {
        display: none !important;
    }
}

.nav-link-mobile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--muted-foreground);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link-mobile:hover {
    color: var(--primary);
    background-color: var(--muted);
}

.nav-mobile-cta {
    padding: 1rem 1rem 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn svg {
    transition: transform 0.2s ease;
}

.btn:hover svg {
    transform: translateX(4px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background-color: hsla(187, 80%, 45%, 0.05);
}

.btn-outline:hover svg {
    transform: none;
}

.btn-secondary {
    background-color: var(--foreground);
    color: var(--primary-foreground);
}

.btn-secondary:hover {
    opacity: 0.9;
}

.btn-full {
    width: 100%;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 4rem 0;
    background-color: var(--background);
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 0;
    }
}

.hero-content {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.hero-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hero-highlights {
        gap: 2.5rem;
    }
}

.highlight {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
}

.highlight svg {
    color: var(--primary);
}

.highlight span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==========================================================================
   ARTICLES SECTION
   ========================================================================== */
.articles-section {
    padding: 3rem 0 5rem;
}

@media (min-width: 768px) {
    .articles-section {
        padding: 5rem 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.section-description {
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 0 auto;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-tab {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: var(--card);
    color: var(--muted-foreground);
    border: 1px solid var(--border);
}

.category-tab:hover {
    background-color: var(--muted);
    color: var(--foreground);
}

.category-tab.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
    box-shadow: 0 4px 12px hsla(187, 80%, 45%, 0.3);
}

/* Featured Article */
.featured-article-container {
    margin-bottom: 2.5rem;
}

.article-card {
    background-color: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.article-card-featured .article-card-grid {
    display: grid;
    gap: 0;
}

@media (min-width: 768px) {
    .article-card-featured .article-card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.article-card-image-wrapper {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

@media (min-width: 768px) {
    .article-card-featured .article-card-image-wrapper {
        aspect-ratio: auto;
        height: 100%;
    }
}

.article-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-card-image {
    transform: scale(1.05);
}

.article-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .article-card-content {
        padding: 2rem;
    }
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: hsla(187, 80%, 45%, 0.1);
    color: var(--primary);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.featured-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.article-title-featured {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

@media (min-width: 768px) {
    .article-title-featured {
        font-size: 1.875rem;
    }
}

.article-card:hover .article-title-featured,
.article-card:hover .article-title {
    color: var(--primary);
}

.article-excerpt {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.article-read-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    font-weight: 500;
    transition: gap 0.2s ease;
}

.article-card:hover .read-more {
    gap: 0.5rem;
}

/* Article Grid */
.article-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-card-image-wrapper-small {
    aspect-ratio: 16 / 10;
}

.article-card-body {
    padding: 1.25rem;
}

.article-card-body .badge {
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.article-excerpt-small {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta-small {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* No Articles */
.no-articles {
    text-align: center;
    padding: 3rem 0;
    color: var(--muted-foreground);
}

/* ==========================================================================
   NEWSLETTER SECTION
   ========================================================================== */
.newsletter {
    background: var(--gradient-primary);
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .newsletter {
        padding: 5rem 0;
    }
}

.newsletter-content {
    max-width: 42rem;
    margin: 0 auto;
    text-align: center;
}

.newsletter-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-foreground);
}

.newsletter-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-foreground);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .newsletter-title {
        font-size: 1.875rem;
    }
}

.newsletter-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 28rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .newsletter-form {
        flex-direction: row;
    }
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    background-color: var(--primary-foreground);
    color: var(--foreground);
    font-size: 1rem;
}

.newsletter-input::placeholder {
    color: var(--muted-foreground);
}

.newsletter-input:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.newsletter-disclaimer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: var(--card);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .footer {
        padding: 4rem 0;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-brand {
    grid-column: span 2;
}

@media (min-width: 768px) {
    .footer-brand {
        grid-column: span 1;
    }
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 36px;
    height: 36px;
    background-color: var(--muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-list a {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}

.footer-list a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.copyright {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.legal {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    z-index: 100;
    transform: translateY(150%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 320px;
    border-left: 4px solid var(--primary);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-content strong {
    display: block;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.toast-content p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ==========================================================================
   UTILITY: HIDDEN ARTICLES
   ========================================================================== */
.article-card.hidden {
    display: none;
}

.article-card.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}
