/* ===== 웹개발 블로그 전용 스타일 ===== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 50px 50px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 500px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
}

.title-accent {
    background: linear-gradient(45deg, #ffd700, #ffec8b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-animation {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 300px;
}

.code-line {
    height: 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    margin-bottom: 16px;
    border-radius: 4px;
    animation: pulse 2s ease-in-out infinite;
}

.code-line:nth-child(1) {
    width: 80%;
    animation-delay: 0s;
}

.code-line:nth-child(2) {
    width: 60%;
    animation-delay: 0.5s;
}

.code-line:nth-child(3) {
    width: 90%;
    animation-delay: 1s;
}

.code-line:nth-child(4) {
    width: 70%;
    animation-delay: 1.5s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.category-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.category-icon .icon-svg {
    width: 32px;
    height: 32px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.category-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: var(--primary-dark);
}

.post-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Recent Posts Section */
.recent-posts-section {
    padding: 80px 0;
    background: white;
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: var(--primary-dark);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.post-content {
    padding: 24px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.post-category {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-tag {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.newsletter-description {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.newsletter-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.newsletter-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 24px;
        justify-content: center;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .code-animation {
        width: 250px;
        padding: 24px;
    }
    
    .categories-section,
    .recent-posts-section {
        padding: 60px 0;
    }
    
    .categories-grid,
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-card {
        padding: 24px;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .newsletter-input {
        padding: 16px;
    }
    
    .newsletter-button {
        padding: 16px 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-card {
        padding: 20px;
    }
    
    .category-icon {
        width: 56px;
        height: 56px;
    }
    
    .category-icon .icon-svg {
        width: 28px;
        height: 28px;
    }
}