/* ========================================
   Beauty Lab - Pastel Blog Theme
   ======================================== */

:root {
    /* Pastel Color Palette */
    --primary: #ff9a9e;
    --primary-light: #ffeef0;
    --secondary: #fecfef;
    --accent: #a8d8ea;
    --accent-light: #e8f6fa;
    --mint: #c1e1c1;
    --lavender: #e6e6fa;
    --peach: #ffdab9;
    
    /* Neutrals */
    --bg: #fffbfc;
    --bg-card: #ffffff;
    --text: #4a4a4a;
    --text-light: #8a8a8a;
    --border: #f0e6e8;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(255, 154, 158, 0.08);
    --shadow-md: 0 4px 20px rgba(255, 154, 158, 0.12);
    --shadow-lg: 0 8px 40px rgba(255, 154, 158, 0.16);
}

/* ========================================
   Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Header
   ======================================== */

.header {
    position: sticky;
    top: 0;
    background: rgba(255, 251, 252, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.logo-icon {
    font-size: 1.75rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--primary-light);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-nav {
    display: none;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

/* ========================================
   Layout
   ======================================== */

.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.main {
    min-width: 0;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    padding: 3rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 50%, var(--lavender) 100%);
    border-radius: 24px;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.hero-line {
    display: block;
}

.hero-line.highlight {
    background: linear-gradient(90deg, var(--primary), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-light);
}

.hero-deco {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.deco-circle.c1 {
    width: 120px;
    height: 120px;
    background: var(--accent);
    top: 20%;
    right: 10%;
    animation: pulse 4s ease-in-out infinite;
}

.deco-circle.c2 {
    width: 80px;
    height: 80px;
    background: var(--mint);
    bottom: 20%;
    right: 25%;
    animation: pulse 4s ease-in-out infinite 0.5s;
}

.deco-circle.c3 {
    width: 60px;
    height: 60px;
    background: var(--peach);
    top: 40%;
    right: 5%;
    animation: pulse 4s ease-in-out infinite 1s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* ========================================
   Posts Section
   ======================================== */

.posts-section {
    margin-bottom: 2rem;
}

.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.posts-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.posts-count {
    font-size: 0.9rem;
    color: var(--text-light);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Post Card */
.post-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--border);
    transition: all 0.3s;
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.post-card-thumb {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--primary-light), var(--lavender));
    overflow: hidden;
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-card-thumb img {
    transform: scale(1.05);
}

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

.post-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.cat-diet {
    background: #e8f5e9;
    color: #2e7d32;
}

.cat-beauty {
    background: #fce4ec;
    color: #c2185b;
}

.cat-review {
    background: #e3f2fd;
    color: #1565c0;
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.post-card-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px dashed var(--border);
}

.no-posts-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-posts p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.btn-write {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-write:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Ad Slots
   ======================================== */

.sidebar-ad {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ad-unit {
    width: 300px;
}

.ad-label {
    font-size: 0.7rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.ad-slot {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--text-light);
    text-align: center;
    min-height: 250px;
}

.ad-placeholder small {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.bottom-ad {
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
}

.bottom-ad .ad-slot {
    width: 100%;
}

.bottom-ad .ad-placeholder {
    min-height: 100px;
    padding: 1.5rem;
}

/* 반응형 광고 슬롯 */
.ad-responsive {
    min-height: 100px;
}

/* ========================================
   Post Detail Page
   ======================================== */

.post-detail {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem;
    border: 2px solid var(--border);
    margin-bottom: 2rem;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-category {
    display: inline-block;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.post-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

.post-meta .updated {
    color: var(--primary);
    margin-left: 0.5rem;
}

.post-thumbnail {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.9;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2,
.post-content h3 {
    font-family: 'Outfit', sans-serif;
    margin: 2rem 0 1rem;
}

.post-content img {
    border-radius: 12px;
    margin: 1.5rem 0;
}

.post-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.375rem 0.875rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Post Navigation */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.nav-prev,
.nav-next {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    transition: all 0.2s;
}

.nav-prev:hover,
.nav-next:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.375rem;
}

.nav-title {
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Related Posts */
.related-posts {
    margin-bottom: 2rem;
}

.related-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.related-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
}

.related-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.related-card img,
.related-card .no-thumb {
    aspect-ratio: 16/10;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), var(--lavender));
}

.related-info {
    padding: 1rem;
}

.related-info .cat-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.related-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-not-found {
    text-align: center;
    padding: 4rem 2rem;
}

.post-not-found h2 {
    margin-bottom: 0.5rem;
}

.post-not-found p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.btn-back {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-weight: 500;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    margin-top: 2rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-light);
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-light);
    transition: color 0.2s;
}

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

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-ad {
        display: none;
    }
    
    .hero-deco {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-nav {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mobile-nav.open {
        display: flex;
    }
    
    .mobile-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .hero {
        padding: 2rem 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-desc {
        font-size: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-detail {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-nav {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .bottom-ad .ad-slot {
        max-width: 100%;
    }
    
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0.875rem 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .layout {
        padding: 1rem;
    }
    
    .hero {
        padding: 1.5rem 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
