/* Base styles */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.program-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.program-card:hover {
    transform: translateY(-5px);
}

.program-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.program-card h3 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    text-align: center;
    color: #4c7437;
}

/* First card special styling */
.program-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.program-card:first-child img {
    height: 400px;
}

.program-card:first-child h3 {
    font-size: 24px;
    padding: 20px;
}

/* Info section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-card {
    background-color: #4c7437;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.info-card:hover {
    background-color: #3a5a2a;
}

.info-card a {
    text-decoration: none;
    color: #f8f5ee;
}

.info-card i {
    font-size: 24px;
    margin-bottom: 10px;
}

.info-card h3 {
    margin: 0;
    font-size: 16px;
}

/* Fee section */
.fee-notes {
    width: 95%;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fee-section {
    margin: 40px 0;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 12px;
}

.fee-section h3 {
    color: #2b5734;
    text-align: center;
    margin-bottom: 30px;
}

.fee-section h4 {
    color: #2b5734;
    font-size: 1.2em;
    margin: 25px 0 15px;
    padding-left: 10px;
    border-left: 4px solid #2b5734;
}

/* 料金の色分け */
.price {
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
}

.price.orange { background: #fff3e0; color: #f57c00; }
.price.red { background: #ffebee; color: #d32f2f; }
.price.blue { background: #e3f2fd; color: #1976d2; }
.price.pink { background: #fce4ec; color: #c2185b; }
.price.green { background: #e8f5e9; color: #388e3c; }
.price.teal { background: #e0f2f1; color: #00796b; }

/* リスト装飾 */
.fee-details ul, 
.fee-notes ul {
    list-style: none;
    padding-left: 20px;
}

.fee-details li, 
.fee-notes li {
    margin-bottom: 15px;
    line-height: 1.8;
    position: relative;
    padding-left: 20px;
}

.fee-details li::before,
.fee-notes li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2b5734;
}

/* 料金例 */
.fee-example {
    background: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fee-example h5 {
    color: #2b5734;
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px dashed #e0e0e0;
}

.fee-example p {
    line-height: 1.8;
    margin-bottom: 10px;
}

/* キャンセル規定 */
.cancellation-policy {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Highlight colors */
.highlight-pink { color: deeppink; }
.highlight-red { color: red; }
.highlight-green { color: limegreen; }
.highlight-teal { color: teal; }

/* Ranger guide section */
#ranger-guide {
    margin: 60px auto 0;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.highlight {
    background-color: #4c7437;
    color: #f8f5ee;
    padding: 10px;
    border-radius: 5px;
}

/* Theme sections */
.theme-title {
    background-color: #4c7437;
    color: #f8f5ee;
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 40px;
}

.theme-content {
    margin: 20px;
}

.theme-intro {
    margin: 20px 0;
    line-height: 1.6;
}

.theme-intro h4 {
    color: #3a5a2a;
    border-bottom: 3px solid #4c7437;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.4em;
}

/* Image handling */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    max-width: 660px; /* (200px + gap 15px) × 3 + 余白 */
    margin: 0 auto 20px;
}

.resizeimage240 {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.full-width-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.full-width-img:hover {
    transform: scale(1.02);
}

/* Recommendation section */
.recommendation {
    background: #f0f7f1;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.recommendation h5 {
    color: #2b5734;
    margin: 0 0 15px;
}

.recommendation ul {
    margin: 0;
    padding-left: 20px;
}

.recommendation li {
    margin: 10px 0;
    line-height: 1.6;
}

/* Button styles */
.box-btnred {
    margin: 30px 0;
    text-align: center;
}

.box-btnred a {
    display: inline-block;
    background-color: #4c7437;
    color: #ffffff !important;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.box-btnred a:hover {
    background-color: #69a649;
}

/* Media Queries */
@media (max-width: 768px) {
    .programs-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .program-card:first-child {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .program-card:first-child img {
        height: 200px;
    }
    
    .info-section {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .theme-intro h4 {
        font-size: 1.2em;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    #ranger-guide {
        padding: 15px;
        margin-top: 30px;
    }
    
    .image-gallery {
        flex-direction: column;
    }
    
    .image-gallery img {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .box-btnred a {
        padding: 12px 20px;
        font-size: 0.9em;
    }
    
    .recommendation {
        padding: 15px;
    }
}

/* プログラムの流れセクション */
.program-flow {
    margin: 40px 0;
    padding: 20px;
    background-color: #f8f5ee;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.program-flow h4 {
    color: #4c7437;
    font-size: 1.3em;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #4c7437;
}

/* グリッドコンテナのスタイル */
.grid-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.subgrid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* グリッドアイテムのスタイル */
.grid-item {
    text-align: center;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

/* 画像のスタイル */
.resizeimage250 {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* テキストのスタイル */
.grid-item br + br {
    display: none;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .subgrid-container {
        gap: 15px;
    }
    
    .grid-item {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .subgrid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .program-flow {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .subgrid-container {
        grid-template-columns: 1fr;
    }
    
    .grid-item {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .program-flow h4 {
        font-size: 1.2em;
    }
}

/* Theme content layout */
.theme-content .theme-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin: 20px 0;
}

.theme-content .theme-text {
    flex: 1;
}

.theme-content .theme-image {
    flex: 0 0 35%;
}

/* 画像ギャラリーのレイアウト */
.theme-content .image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 300px;
    margin: 0 auto;
}

/* 最初の画像を大きく表示 */
.theme-content .image-gallery img:first-child {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

/* 2番目以降の画像を小さく表示 */
.theme-content .image-gallery img:not(:first-child) {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
}

/* 共通の画像スタイル */
.theme-content .image-gallery img {
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .theme-content .theme-content-wrapper {
        flex-direction: column-reverse;
    }
    
    .theme-content .theme-image {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }
    
    .theme-content .image-gallery {
        grid-template-columns: repeat(3, 1fr);
        max-width: 450px;
    }
    
    .theme-content .image-gallery img:first-child {
        grid-column: auto;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 480px) {
    .theme-content .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
    }
    
    .theme-content .image-gallery img:first-child {
        grid-column: 1 / -1;
    }
}

/* アレンジプログラムの基本スタイル */
.program-title {
    background: #f5f5f5;
    padding: 12px 15px;
    border-left: 5px solid #2b5734;
    margin: 40px 0 20px;
    font-size: 1.2em;
}

/* プログラムコンテンツ */
.program-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.program-content p {
    line-height: 1.8;
    margin: 20px 0;
}

/* プログラム画像 */
.program-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    border-radius: 8px;
}

/* プログラム概要 */
.program-overview {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.program-overview h4 {
    color: #2b5734;
    margin: 0 0 15px;
}

.program-overview ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.program-overview li {
    margin: 15px 0;
    line-height: 1.6;
}

.program-overview strong {
    display: inline-block;
    min-width: 100px;
}

/* PDFギャラリー */
.pdf-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.pdf-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ハイライト */
.highlight {
    font-weight: bold;
}

/* レスポンシブ対応 */
@media screen and (max-width: 960px) {
    .program-content {
        padding: 0 15px;
    }

    .program-image {
        max-width: 80%;
    }
}

@media screen and (max-width: 768px) {
    .program-title {
        font-size: 1.1em;
        padding: 10px 12px;
    }

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

    .program-overview strong {
        display: block;
        margin-bottom: 5px;
    }
}

@media screen and (max-width: 480px) {
    .program-content {
        padding: 0 10px;
    }

    .program-image {
        max-width: 100%;
    }

    .recommendation,
    .program-overview {
        padding: 15px;
    }

    .pdf-gallery {
        gap: 10px;
    }
}

/* クラフト体験セクション */
.craft-content {
    margin: 30px 0;
}

/* トップギャラリー */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.resizeimage240 {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* クラフトメニュー */
.craft-menu {
    margin: 40px 0;
}

.craft-note {
    background: #fff7e6;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

/* クラフトアイテム */
.craft-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin: 40px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.craft-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.craft-details {
    flex: 1;
}

.craft-details h5 {
    color: #2b5734;
    font-size: 1.1em;
    margin: 0 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2b5734;
}

.craft-details p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.craft-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.craft-details li {
    margin: 12px 0;
    line-height: 1.6;
}

.craft-details strong {
    display: inline-block;
    min-width: 100px;
}

/* レスポンシブ対応 */
@media screen and (max-width: 960px) {
    .craft-item {
        grid-template-columns: 250px 1fr;
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .craft-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .craft-image {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 480px) {
    .image-gallery {
        gap: 10px;
    }

    .craft-item {
        padding: 15px;
        margin: 30px 0;
    }

    .craft-details h5 {
        font-size: 1em;
    }

    .craft-details strong {
        display: block;
        margin-bottom: 5px;
    }

    .craft-note {
        padding: 12px;
        font-size: 0.9em;
    }
}

/* スライド＆トークセクション */
.slide-talk-section {
    margin: 40px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.slide-talk-section h3 {
    color: #2b5734;
    margin-bottom: 30px;
    text-align: center;
}

.slide-talk-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* 画像ギャラリー */
.slide-talk-content .image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 660px;
    margin: 0 auto 30px;
}

.slide-talk-content .resizeimage240 {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 0 auto;
}

/* テキストコンテンツ */
.slide-talk-content p {
    line-height: 1.8;
    margin: 20px 0;
}

.fee-link {
    text-align: right;
    margin-top: 30px;
}

.fee-link a {
    color: #2b5734;
    text-decoration: none;
    font-weight: bold;
}

.fee-link a:hover {
    text-decoration: underline;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .slide-talk-section {
        padding: 15px;
        margin: 30px 0;
    }

    .slide-talk-content .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        max-width: 430px;
    }

    .box-btnred {
        max-width: 90%;
    }
}

@media screen and (max-width: 480px) {
    .slide-talk-section h3 {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

    .slide-talk-content .image-gallery {
        gap: 10px;
        max-width: 410px;
    }

    .slide-talk-content .resizeimage240 {
        max-width: 180px;
    }

    .slide-talk-content p {
        font-size: 0.9em;
        line-height: 1.7;
    }

    .box-btnred a {
        padding: 12px 15px;
        font-size: 0.9em;
    }
}

/* オーダーメイドプログラムセクション */
.custom-program-section {
    margin: 40px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.custom-program-section h3 {
    color: #2b5734;
    text-align: center;
    margin-bottom: 30px;
}

.custom-program-section > p {
    line-height: 1.8;
    margin: 20px auto;
    max-width: 900px;
}

/* プログラム事例グリッド */
.program-examples {
    max-width: 1000px;
    margin: 30px auto;
}

.program-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* PDFプログラム事例カード */
.program-item {
    position: relative;
    display: block;
    text-decoration: none;
    color: #333;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

/* PDFバッジ */
.pdf-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #d14;
    color: white;
    padding: 5px 10px;
    font-size: 0.75em;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1;
}

.pdf-badge::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 8px;
    border-color: transparent #d14 transparent transparent;
}

.program-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.program-item:hover .pdf-badge {
    background: #b01;
}

.program-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 6px;
    margin: 0 auto 10px;
    display: block;
}

.program-item p {
    text-align: center;
    font-size: 0.9em;
    line-height: 1.4;
    margin: 0;
    color: #2b5734;
}

/* レスポンシブ対応 */
@media screen and (max-width: 960px) {
    .program-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media screen and (max-width: 768px) {
    .custom-program-section {
        padding: 15px;
        margin: 30px 0;
    }

    .program-item {
        padding: 12px;
    }

    .program-item img {
        max-width: 180px;
    }
}

@media screen and (max-width: 480px) {
    .program-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .custom-program-section h3 {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

    .custom-program-section > p {
        font-size: 0.9em;
        line-height: 1.7;
    }

    .program-item {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 15px;
        align-items: center;
    }

    .pdf-badge {
        top: 5px;
        right: 5px;
        padding: 3px 8px;
    }

    .pdf-badge::before {
        display: none;
    }
}

/* 雨天時プログラムセクション */
.rainy-day-section {
    margin: 40px 0;
    padding: 25px;
    background: #f5f9ff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.rainy-day-section h3 {
    color: #2b5734;
    text-align: center;
    margin-bottom: 25px;
}

/* イントロ部分 */
.intro {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: center;
}

.highlight2 {
    background: #ffecec;
    color: #d14;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: bold;
}

/* コンテンツ部分 */
.rainy-day-content {
    max-width: 900px;
    margin: 0 auto;
}

.rainy-day-content h4 {
    color: #2b5734;
    font-size: 1.2em;
    margin: 30px 0 15px;
    padding-left: 10px;
    border-left: 4px solid #2b5734;
}

.rainy-day-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 20px;
}

.rainy-day-content a {
    color: #2b5734;
    text-decoration: none;
    font-weight: bold;
}

.rainy-day-content a:hover {
    text-decoration: underline;
}

/* 代替プログラム */
.alternative-programs {
    display: grid;
    gap: 20px;
    margin-top: 25px;
    padding-left: 20px;
}

.program {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.program h5 {
    color: #2b5734;
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px dashed #e0e0e0;
}

.program p {
    padding-left: 0;
    margin-bottom: 0;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .rainy-day-section {
        padding: 20px;
        margin: 30px 0;
    }

    .intro {
        font-size: 1em;
        text-align: left;
    }

    .rainy-day-content h4 {
        font-size: 1.1em;
    }

    .program {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .rainy-day-section {
        padding: 15px;
    }

    .rainy-day-section h3 {
        font-size: 1.1em;
    }

    .highlight2 {
        display: inline-block;
        margin: 2px 0;
    }

    .rainy-day-content p {
        font-size: 0.9em;
        padding-left: 10px;
    }

    .program h5 {
        font-size: 1em;
    }

    .alternative-programs {
        gap: 15px;
        padding-left: 10px;
    }
}