/* ==========================================================================
   Wedding Sense - Main Style CSS
   레이아웃 및 공통 스타일
   ========================================================================== */

/* ==========================================================================
   1. 변수 및 기본 설정
   ========================================================================== */
:root {
    /* Primary Colors */
    --primary-color: #ff6b9d;
    --primary-light: #ff8fab;
    --primary-dark: #e85a89;
    --primary-gradient: linear-gradient(135deg, #ff6b9d 0%, #e8b4b8 100%);
    
    /* Secondary Colors */
    --secondary-color: #e8b4b8;
    --secondary-light: #f0d1d3;
    --secondary-dark: #d9a0a4;
    
    /* Neutral Colors */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    
    /* Layout Variables */
    --header-height: 80px;
    --sidebar-width: 250px;
    --container-max-width: 1200px;
    --spacing-unit: 8px;
    
    /* Typography */
    --font-main: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

/* ==========================================================================
   4. Layout Structure
   ========================================================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 15px;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

/* Main Content Area */
.main-wrapper {
    display: flex;
    flex: 1;
    padding-top: var(--header-height);
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-light);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    overflow-y: auto;
}

.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
}

.content-full {
    margin-left: 0;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: var(--bg-white);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-top {
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 2rem;
}

.footer-bottom {
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}

/* ==========================================================================
   5. Utilities
   ========================================================================== */
/* Spacing */
.mt-1 { margin-top: calc(var(--spacing-unit) * 1); }
.mt-2 { margin-top: calc(var(--spacing-unit) * 2); }
.mt-3 { margin-top: calc(var(--spacing-unit) * 3); }
.mt-4 { margin-top: calc(var(--spacing-unit) * 4); }
.mt-5 { margin-top: calc(var(--spacing-unit) * 5); }

.mb-1 { margin-bottom: calc(var(--spacing-unit) * 1); }
.mb-2 { margin-bottom: calc(var(--spacing-unit) * 2); }
.mb-3 { margin-bottom: calc(var(--spacing-unit) * 3); }
.mb-4 { margin-bottom: calc(var(--spacing-unit) * 4); }
.mb-5 { margin-bottom: calc(var(--spacing-unit) * 5); }

.pt-1 { padding-top: calc(var(--spacing-unit) * 1); }
.pt-2 { padding-top: calc(var(--spacing-unit) * 2); }
.pt-3 { padding-top: calc(var(--spacing-unit) * 3); }
.pt-4 { padding-top: calc(var(--spacing-unit) * 4); }
.pt-5 { padding-top: calc(var(--spacing-unit) * 5); }

.pb-1 { padding-bottom: calc(var(--spacing-unit) * 1); }
.pb-2 { padding-bottom: calc(var(--spacing-unit) * 2); }
.pb-3 { padding-bottom: calc(var(--spacing-unit) * 3); }
.pb-4 { padding-bottom: calc(var(--spacing-unit) * 4); }
.pb-5 { padding-bottom: calc(var(--spacing-unit) * 5); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.justify-content-start { justify-content: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }

/* Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }

/* ==========================================================================
   6. Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
    
    .col-md-6,
    .col-md-4,
    .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    :root {
        --header-height: 60px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .content {
        padding: 1rem;
    }
}

/* ==========================================================================
   7. Print Styles
   ========================================================================== */
@media print {
    .header,
    .sidebar,
    .footer {
        display: none;
    }
    
    .content {
        margin: 0;
        padding: 0;
    }
}