/* Previous Lessons Page Styles */
/* Base reset and typography for lesson page */
:root {
    color-scheme: only light;
    /* 新しいカラーパレット */
    --color-base: #F8F8F8;
    --color-main: #4B4B4B;
    --color-accent: #D4A373;
    --color-sub: #8E9AAF;
    --color-white: #FFFFFF;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: var(--color-main);
    line-height: 1.6;
    background-color: var(--color-base);
}

h1,
h2,
h3,
h4 {
    font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
    margin: 0 0 0.5em;
    color: var(--color-main);
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

ul,
ol {
    margin: 0 0 1em 1.2em;
    padding: 0;
}

img {
    max-width: 100%;
    display: block;
    border-radius: 8px;
}

/* Hero section */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-accent) 0%, #E6B86A 100%);
    color: #fff;
    text-align: center;
    padding: 6rem 1rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero--lesson {
    min-height: 350px;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero__content {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero__content h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    letter-spacing: 0.08rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.hero__content p {
    max-width: 540px;
    margin: 1rem auto 2rem;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero__links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    background-color: var(--color-white);
    color: var(--color-accent);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.button:hover,
.button:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(75, 75, 75, 0.15);
    text-decoration: none;
}

.button--outline {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.button--outline:hover,
.button--outline:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
}

.button--lesson {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.button--lesson:hover,
.button--lesson:focus {
    background-color: #E6B86A;
}

/* Sections */
.section {
    padding: 4rem 1rem;
}

.section--highlight {
    background-color: var(--color-white);
    border-top: 1px solid rgba(139, 154, 175, 0.2);
}

.section__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section__content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.section__content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.section__content p {
    font-size: 1.1rem;
    color: var(--color-sub);
    margin-bottom: 2rem;
}

.lesson-button-container {
    margin-top: 2rem;
    text-align: center;
}

/* Footer */
.footer {
    background-color: var(--color-main);
    color: var(--color-white);
    padding: 2rem 1rem;
    text-align: center;
}

.footer__inner {
    max-width: 800px;
    margin: 0 auto;
}

.footer__inner p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
}

.footer__inner a {
    color: var(--color-accent);
    font-weight: 600;
}

.footer__inner a:hover,
.footer__inner a:focus {
    color: #E6B86A;
}

.previous-lessons-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.lesson-item {
    margin-bottom: 4rem;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(139, 154, 175, 0.2);
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lesson-text {
    width: 100%;
    max-width: 800px;
}

.lesson-text h2 {
    font-size: 2rem;
    color: var(--color-main);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.lesson-text h3 {
    font-size: 1.4rem;
    color: var(--color-sub);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* 写真を横スクロールで表示 */
.lesson-photos {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 0 1rem 0;
    margin-top: 1.5rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* スクロールバーのスタイル */
.lesson-photos::-webkit-scrollbar {
    height: 8px;
}

.lesson-photos::-webkit-scrollbar-track {
    background: rgba(139, 154, 175, 0.1);
    border-radius: 4px;
}

.lesson-photos::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.lesson-photos::-webkit-scrollbar-thumb:hover {
    background: #E6B86A;
}

.lesson-photos img {
    flex: 0 0 280px;
    width: 280px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(75, 75, 75, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: center;
    user-select: none;
    -webkit-user-drag: none;
}

.lesson-photos img:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(75, 75, 75, 0.25);
}

/* スクロール矢印 */
.lesson-photos-container {
    position: relative;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.scroll-arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.scroll-arrow.left {
    left: 10px;
}

.scroll-arrow.right {
    right: 10px;
}

.scroll-arrow svg {
    width: 20px;
    height: 20px;
    fill: var(--color-main);
}

.scroll-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.scroll-arrow:disabled:hover {
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .lesson-photos {
        gap: 1rem;
    }
    
    .lesson-photos img {
        flex: 0 0 240px;
        width: 240px;
        height: 180px;
    }
    
    .lesson-text h2 {
        font-size: 1.8rem;
    }
    
    .lesson-text h3 {
        font-size: 1.2rem;
    }
    
    .scroll-arrow {
        width: 35px;
        height: 35px;
    }
    
    .scroll-arrow svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .previous-lessons-container {
        padding: 1rem 0;
    }
    
    .lesson-item {
        margin-bottom: 3rem;
        padding: 1.5rem 0;
    }
    
    .lesson-photos {
        gap: 1rem;
    }
    
    .lesson-photos img {
        flex: 0 0 250px;
        width: 250px;
        height: 180px;
    }
    
    .lesson-text h2 {
        font-size: 1.6rem;
    }
    
    .lesson-text h3 {
        font-size: 1.1rem;
    }
    
    .scroll-arrow {
        width: 30px;
        height: 30px;
    }
    
    .scroll-arrow.left {
        left: 5px;
    }
    
    .scroll-arrow.right {
        right: 5px;
    }
    
    .scroll-arrow svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .lesson-photos img {
        flex: 0 0 220px;
        width: 220px;
        height: 160px;
    }
    
    .lesson-text h2 {
        font-size: 1.4rem;
    }
    
    .lesson-text h3 {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero {
        padding: 4rem 1rem;
        min-height: 300px;
    }
    
    .hero__content h1 {
        font-size: 2rem;
    }
    
    .hero__content p {
        font-size: 1rem;
    }
    
    .section {
        padding: 2rem 1rem;
    }
    
    .section__content h2 {
        font-size: 1.8rem;
    }
    
    .section__content p {
        font-size: 1rem;
    }
    
    .scroll-arrow {
        width: 28px;
        height: 28px;
    }
    
    .scroll-arrow svg {
        width: 14px;
        height: 14px;
    }
}
