/* Custom CSS for 도도뷰티 (DodoBeauty) Website */

/* 색상 변수 정의 */
:root {
    --primary-color: #2563eb;     /* 파랑색 메인 */
    --primary-dark: #1d4ed8;      /* 진한 파랑 */
    --primary-light: #3b82f6;     /* 밝은 파랑 */
    --secondary-color: #64748b;    /* 그레이 서브 */
    --accent-color: #f59e0b;      /* 금색 포인트 */
    --accent-dark: #d97706;       /* 진한 금색 */
    --accent-light: #fbbf24;      /* 밝은 금색 */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;          /* 흰색 배경 */
    --border-light: #e5e7eb;
}

/* 커스텀 스크롤바 스타일 */
/* Webkit 기반 브라우저 (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;  /* 스크롤바 너비 */
    height: 8px; /* 가로 스크롤바 높이 */
}

::-webkit-scrollbar-track {
    background: #f1f5f9;        /* 스크롤바 트랙 배경 (연한 회색) */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);  /* 스크롤바 썸 (파랑색) */
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);   /* 호버 시 진한 파랑색 */
}

::-webkit-scrollbar-thumb:active {
    background: var(--accent-color);   /* 클릭 시 금색 */
}

::-webkit-scrollbar-corner {
    background: #f1f5f9;        /* 스크롤바 모서리 */
}

/* Firefox 브라우저 지원 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f5f9;
}

/* Custom animations and transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Scroll animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Custom gradient backgrounds */
.gradient-bg-1 {
    background: linear-gradient(135deg, #fce7f3 0%, #fed7e2 50%, #fbb6ce 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 50%, #d8b4fe 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 50%, #fdba74 100%);
}

/* Enhanced button styles */
.btn-primary {
    background: linear-gradient(135deg, #f43f5e, #ec4899);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #f43f5e;
    color: #f43f5e;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f43f5e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.3);
}

/* Card hover effects */
.card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Service cards */
.service-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f43f5e, #ec4899, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

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

/* Portfolio grid */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(244, 63, 94, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item:hover::after {
    opacity: 1;
}

/* Form styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #f43f5e;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
    transform: translateY(-1px);
}

.form-input:invalid {
    border-color: #ef4444;
}

.form-input:valid {
    border-color: #10b981;
}

/* Navigation enhancements */
.navbar {
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-link {
    position: relative;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #f43f5e;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: #f43f5e;
}

/* Hero section enhancements */
.hero-title {
    background: linear-gradient(135deg, #1f2937, #374151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-highlight {
    background: linear-gradient(135deg, #f43f5e, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pricing cards */
.pricing-card {
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card.featured {
    transform: scale(1.05);
    border: 2px solid #f43f5e;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

/* Loading animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #f43f5e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success message */
.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: none;
    align-items: center;
    animation: fadeInUp 0.5s ease;
}

.success-message.show {
    display: flex;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .pricing-card.featured {
        transform: none;
        margin-bottom: 2rem;
    }
    
    .navbar {
        padding: 0.5rem 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Section spacing */
.section {
    padding: 5rem 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #f43f5e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e11d48;
}

/* Accessibility improvements */
.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;
}

/* Focus styles */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #f43f5e;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .auto-dark .bg-white {
        background-color: #374151;
    }
    
    .auto-dark .text-gray-900 {
        color: #f9fafb;
    }
    
    .auto-dark .text-gray-600 {
        color: #d1d5db;
    }
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.backface-hidden {
    backface-visibility: hidden;
}

.hardware-accelerated {
    transform: translateZ(0);
}

/* ========================================
   BLOG SECTION STYLES
   ======================================== */

/* Blog article cards */
.blog-article {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

/* Blog category tags */
.blog-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #fce7f3, #fed7e2);
    color: #be185d;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-category.care {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.blog-category.trend {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    color: #92400e;
}

.blog-category.technique {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #3730a3;
}

.blog-category.news {
    background: linear-gradient(135deg, #fce7f3, #fed7e2);
    color: #be185d;
}

/* Blog post content */
.blog-content {
    line-height: 1.7;
    color: #374151;
}

.blog-content h3 {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Blog meta information */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.blog-meta .blog-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-meta .blog-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Blog read more button */
.blog-read-more {
    color: #f43f5e;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    color: #e11d48;
    transform: translateX(3px);
}

.blog-read-more i {
    transition: transform 0.3s ease;
}

.blog-read-more:hover i {
    transform: translateX(3px);
}

/* Blog filter controls */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.blog-category-filter {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.blog-category-filter:focus {
    outline: none;
    border-color: #f43f5e;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.blog-load-more {
    background: linear-gradient(135deg, #f43f5e, #ec4899);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-load-more:hover {
    background: linear-gradient(135deg, #e11d48, #db2777);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.3);
}

/* Blog modal styles */
.blog-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.blog-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 4rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.blog-modal-header {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
    z-index: 10;
}

.blog-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
}

.blog-modal-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.blog-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.blog-modal-body {
    padding: 2rem;
}

.blog-modal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.blog-modal-image {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.blog-modal-prose {
    line-height: 1.8;
    color: #374151;
    font-size: 1rem;
}

.blog-modal-prose h1,
.blog-modal-prose h2,
.blog-modal-prose h3,
.blog-modal-prose h4 {
    color: #1f2937;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-modal-prose h1 {
    font-size: 1.875rem;
}

.blog-modal-prose h2 {
    font-size: 1.5rem;
}

.blog-modal-prose h3 {
    font-size: 1.25rem;
}

.blog-modal-prose p {
    margin-bottom: 1.5rem;
}

.blog-modal-prose ul,
.blog-modal-prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-modal-prose li {
    margin-bottom: 0.5rem;
}

.blog-modal-prose strong {
    font-weight: 600;
    color: #1f2937;
}

.blog-modal-prose em {
    font-style: italic;
    color: #6b7280;
}

.blog-tags {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #f3f4f6;
}

.blog-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    border-radius: 50px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-tag:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Text truncation utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog responsive design */
@media (max-width: 768px) {
    .blog-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .blog-category-filter,
    .blog-load-more {
        width: 100%;
        text-align: center;
    }
    
    .blog-modal {
        padding: 0.5rem;
    }
    
    .blog-modal-content {
        max-width: 100%;
        border-radius: 12px;
    }
    
    .blog-modal-header {
        padding: 1rem 1.5rem;
        border-radius: 12px 12px 0 0;
    }
    
    .blog-modal-body {
        padding: 1.5rem;
    }
    
    .blog-modal-title {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    .blog-modal-image {
        height: 12rem;
    }
    
    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}