/* 
 * Layout CSS
 * レイアウト・コンテナ・グリッドシステム
 */

/* ========================================
   Container Extensions
======================================== */
.container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-narrow {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========================================
   セクション間スペーサー
======================================== */
.section-spacer {
    height: 80px; /* セクション間の標準スペース */
}

.section-spacer--small {
    height: 40px; /* 小さめのスペース */
}

.section-spacer--large {
    height: 120px; /* 大きめのスペース */
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .section-spacer {
        height: 60px;
    }
    
    .section-spacer--small {
        height: 30px;
    }
    
    .section-spacer--large {
        height: 80px;
    }
}

/* ========================================
   Grid System
======================================== */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ========================================
   Flex System
======================================== */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.items-end {
    align-items: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

/* ========================================
   Responsive Adjustments
======================================== */
@media (max-width: 968px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .container-wide,
    .container-narrow {
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .container-wide,
    .container-narrow {
        padding: 0 var(--spacing-sm);
    }
}