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

:root {
    --primary: #1e3a8a;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --primary-bg: #dbeafe;
    --text-dark: #0f172a;
    --text-medium: #475569;
    --text-light: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-light: #e2e8f0;
    --dark-bg: #0a1733;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f1f5f9;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

/* Page Wrapper */
.page-wrapper {
    min-height: 100vh;
    padding: 20px;
    background: #f1f5f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 48px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

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

.logo-line-1, .logo-line-2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.nav-list {
    display: flex;
    gap: 36px;
    align-items: center;
}

.nav-link {
    color: var(--text-medium);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    padding: 4px 0;
}

.nav-link:hover {
    color: var(--text-dark);
}

.nav-link.active {
    color: var(--text-dark);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -26px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nav-btn {
    padding: 10px 20px;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* Blog Hero */
.blog-hero {
    padding: 60px 48px 40px;
    animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 17px;
    color: var(--text-medium);
    line-height: 1.5;
}

/* Blog Section */
.blog-section {
    padding: 0 48px 60px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 56px;
}

.blog-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    animation: fadeInUp 0.6s ease backwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

/* Blog Image */
.blog-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: #e2e8f0;
}

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

.blog-card:hover .blog-image {
    transform: scale(1.08);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(30, 58, 138, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .image-overlay {
    opacity: 1;
}

/* Blog Content */
.blog-content {
    padding: 24px 24px 28px;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

.blog-category {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.blog-card:hover .blog-category {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.blog-date {
    font-size: 13px;
    color: var(--text-medium);
    font-weight: 500;
}

.blog-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 54px;
}

.blog-card:hover .blog-title {
    color: var(--primary);
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.blog-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.blog-card:hover .blog-link {
    color: var(--primary-dark);
}

.blog-card:hover .blog-link svg {
    transform: translateX(6px);
}

/* View All Posts */
.view-all-container {
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: white;
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-view-all::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.btn-view-all span,
.btn-view-all svg {
    position: relative;
    z-index: 1;
    transition: color 0.2s ease;
}

.btn-view-all:hover {
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-view-all:hover::before {
    transform: translateY(0);
}

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

.btn-view-all svg {
    width: 18px;
    height: 18px;
}

/* Newsletter Section */
.newsletter-section {
    background: var(--dark-bg);
    margin: 0 48px 48px;
    padding: 40px 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    color: white;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease 0.4s backwards;
}

.newsletter-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, transparent 50%, #cbd5e1 50%);
    border-bottom-right-radius: 16px;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatGlow 6s ease-in-out infinite;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(1.1); }
}

.newsletter-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.newsletter-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.newsletter-text {
    font-size: 14px;
    color: #cbd5e1;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.newsletter-input {
    padding: 12px 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    border-radius: 8px;
    outline: none;
    width: 280px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.newsletter-btn {
    padding: 12px 24px;
    background: white;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: #f8fafc;
}

/* Responsive */
@media (max-width: 1024px) {
    .header {
        padding: 20px 32px;
    }
    
    .nav-list {
        gap: 24px;
    }
    
    .blog-hero {
        padding: 48px 32px 32px;
    }
    
    .page-title {
        font-size: 38px;
    }
    
    .blog-section {
        padding: 0 32px 48px;
    }
    
    .blog-grid {
        gap: 20px;
    }
    
    .blog-title {
        font-size: 17px;
    }
    
    .newsletter-section {
        margin: 0 32px 32px;
        padding: 32px;
    }
    
    .newsletter-input {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 10px;
    }
    
    .container {
        border-radius: 16px;
    }
    
    .header {
        padding: 16px 20px;
    }
    
    .nav, .nav-btn {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .blog-hero {
        padding: 40px 24px 28px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .page-subtitle {
        font-size: 15px;
    }
    
    .blog-section {
        padding: 0 24px 40px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .blog-image-wrapper {
        aspect-ratio: 16/9;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-title {
        font-size: 18px;
        min-height: auto;
    }
    
    .btn-view-all {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .newsletter-section {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 28px 24px;
        margin: 0 24px 24px;
    }
    
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }
    
    .newsletter-input {
        width: 100%;
    }
    
    .newsletter-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
    }
    
    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
