/*
Theme Name: Hoikuen Custom Theme
Theme URI: http://hoikuen-site.local/
Author: Your Name
Author URI: http://hoikuen-site.local/
Description: Custom theme for Hoikuen website.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hoikuen-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;700&display=swap');

/* ===================================
   Base Styles
   =================================== */
body {
    font-family: 'Zen Maru Gothic', 'M PLUS Rounded 1c', sans-serif; /* Zen Maru Gothic を優先 */
    margin: 0;
    background-color: #fdfdfd;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #f8f8f8;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6em;
    font-weight: bold;
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.logo img {
    height: 45px;
    vertical-align: middle;
    margin-right: 10px;
}

main {
    width: 50%; /* Set width to 50% */
    margin: 20px auto;
    padding: 20px; /* Restore padding */
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-grow: 1;
}

footer {
    background-color: #ffffff;
    padding: 1.5em;
    text-align: center;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: auto;
}

/* ===================================
   Mobile Styles (Default)
   =================================== */
.hamburger-menu {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 200;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #555;
    margin: 5px 0;
    transition: 0.4s;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 150;
    overflow-y: auto;
    padding-top: 80px;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-overlay .nav-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.mobile-nav-overlay .accordion-item {
    width: 90%;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.mobile-nav-overlay .accordion-header {
    background-color: #f8f8f8;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    border: none;
    width: 100%;
    font-size: 1.2em;
}

.mobile-nav-overlay .accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: #fff;
}

.mobile-nav-overlay .accordion-item.active .accordion-content {
    max-height: 500px; /* Adjust as needed */
    padding: 0;
}

.mobile-nav-overlay .accordion-content a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}
.mobile-nav-overlay .accordion-content a:last-child {
    border-bottom: none;
}

/* Tap/Click glow effect for mobile */
.mobile-nav-overlay .nishiya-theme .accordion-content a:active {
    background-color: #e6ffe6;
}
.mobile-nav-overlay .umenoki-theme .accordion-content a:active {
    background-color: #fff0e6;
}

/* Garden Links Styling (Mobile First) */
.garden-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2em;
}

.garden-links a {
    text-decoration: none;
    color: #333;
    border: none;
    padding: 1.5em;
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5em;
}

.garden-links a:last-child {
    margin-bottom: 0;
}

.garden-links a::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.garden-links a:hover::before {
    background-color: rgba(0, 0, 0, 0.2);
}

.garden-links a h3 {
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-size: 2.5em;
}

.nishiya-link {
    background-image: url('placeholder_nishiya.jpg');
}

.umenoki-link {
    background-image: url('placeholder_umenoki.jpg');
}

/* ===================================
   Desktop Styles
   =================================== */
@media (min-width: 769px) {
    .hamburger-menu {
        display: none;
    }

    .mobile-nav-overlay {
        display: block;
        position: static;
        background-color: transparent;
        padding-top: 0;
        overflow-y: visible;
        height: auto;
        width: auto;
    }

    .mobile-nav-overlay .nav-wrapper {
        flex-direction: row;
        padding: 0;
        gap: 20px;
    }

    .mobile-nav-overlay .accordion-item {
        position: relative;
        border: none;
        width: auto;
        overflow: visible; /* Allow dropdown to show */
    }

    .mobile-nav-overlay .accordion-header {
        font-size: 1.1em;
        padding: 10px 20px;
        border-radius: 30px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        color: #555;
        font-weight: bold;
        white-space: nowrap;
    }
    .mobile-nav-overlay .accordion-header:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .mobile-nav-overlay .accordion-content {
        display: none; /* Hide by default, JS will handle showing it */
        position: absolute;
        right: 0;
        background-color: #ffffff;
        min-width: 180px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.15);
        z-index: 100;
        border-radius: 10px;
        border: 1px solid #eee;
        margin-top: 10px;
        max-height: none;
        padding: 0;
        overflow: hidden;
    }

    .mobile-nav-overlay .accordion-content.show-dropdown {
        display: block;
    }

    .mobile-nav-overlay .accordion-content a {
        padding: 12px 20px;
        border-bottom: 1px solid #f5f5f5;
    }

    /* Hover glow effect for desktop */
    .mobile-nav-overlay .nishiya-theme .accordion-content a:hover {
        background-color: #e6ffe6;
        box-shadow: 0 0 10px 3px #e6ffe6;
    }
    .mobile-nav-overlay .umenoki-theme .accordion-content a:hover {
        background-color: #fff0e6;
        box-shadow: 0 0 10px 3px #fff0e6;
    }

    /* Garden Links for Desktop */
    .garden-links {
        flex-direction: row;
        justify-content: space-around;
    }

    .garden-links a {
        width: 40%;
        min-height: 150px;
        margin-bottom: 0;
    }

    .nishiya-link:hover {
        box-shadow: 0 0 20px 5px #e0ffe0;
    }

    .umenoki-link:hover {
        box-shadow: 0 0 20px 5px #ffe0c0;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===================================
   Theme Colors & Main Accordion
   =================================== */
.mobile-nav-overlay .nishiya-theme .accordion-header {
    background-color: #d4edda;
}

.mobile-nav-overlay .umenoki-theme .accordion-header {
    background-color: #ffe0b2;
}

main .accordion-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

main .accordion-item {
    border: none;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

main .accordion-header {
    background-color: #f8f8f8;
    padding: 3px 8px; /* さらに小さく */
    cursor: pointer;
    font-weight: bold;
    text-align: left;
    border: none;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    color: #555;
    font-size: 1.2em; /* さらに小さく */
}

main .accordion-header:hover {
    background-color: #e8e8e8;
}

main .accordion-content {
    padding: 0; /* 初期パディングを0に */
    max-height: 0; /* 初期高さを0に */
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: #f8f8f8; /* ここを修正 */
}

main .accordion-content a {
    color: #333; /* 黒文字に設定 */
    text-decoration: none; /* 下線をなくす */
}

main .accordion-content a:hover {
    text-decoration: none; /* ホバー時の下線も削除 */
}

main .accordion-item.active .accordion-content {
    max-height: 500px; /* Adjust as needed */
    padding: 15px; /* アクティブ時のパディング */
}

main .accordion-item.active .accordion-header {
    background-color: #e8e8e8;
}

.button-container {
    text-align: center;
}

/* 背景デザイン: 固定された風景画 (木の形を調整) */

/* 西谷保育園: 昼の青空と木々 */
   body.nishiya-theme {
       background-image: url('images/nishiya-haikei.webp');
       background-size: cover;
       background-position: center center;
       background-repeat: no-repeat;
       background-attachment: fixed;
   }

/* 梅の木保育園: 夕暮れの空と木々 */
   body.umenoki-theme {
       background-image: url('images/umenoki-haikei.webp');
       background-size: cover;
       background-position: center center;
       background-repeat: no-repeat;
       background-attachment: fixed;
   }

/* 法人ページ用: 上品なリネン風テクスチャ */
body.corporate-theme {
    background-color: #f4f6f8; /* 薄いクールグレー */
    background-image:
        linear-gradient(45deg, rgba(0, 30, 80, 0.05) 25%, transparent 25%, transparent 75%, rgba(0, 30, 80, 0.05) 75%),
        linear-gradient(45deg, rgba(0, 30, 80, 0.05) 25%, transparent 25%, transparent 75%, rgba(0, 30, 80, 0.05) 75%);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    display: flex;
    flex-direction: column;
}

body.corporate-theme main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.corporate-theme .garden-links {
    flex: 1;
    gap: 10px; /* ボタン間の隙間 */
}

body.corporate-theme .garden-links a {
    flex: 1;
}

/* Common Page Title Styles */
.page-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 1em;
    font-weight: normal;
    position: relative;
    padding-bottom: 0.5em;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #e0e0e0;
}

/* Nishiya Theme for Page Title */
body.nishiya-theme .page-title {
    color: #4CAF50; /* Green */
}
body.nishiya-theme .page-title::after {
    background-color: #a5d6a7; /* Light green */
}

/* Umenoki Theme for Page Title */
body.umenoki-theme .page-title {
    color: #FF9800; /* Orange */
}
body.umenoki-theme .page-title::after {
    background-color: #ffcc80; /* Light orange */
}

.philosophy-section {
    padding: 20px;
    background-color: #f9f9f9; /* 薄いグレーの背景 */
    border-radius: 10px;
    margin-bottom: 30px;
}

.philosophy-section p {
    font-size: 1.1em; /* 少し大きく */
    font-weight: bold; /* 太く */
    line-height: 1.8; /* 行間を広げて読みやすく */
}

.br-mobile {
    display: none;
}

@media (max-width: 768px) {
    main {
        width: 90%;
        padding: 15px;
    }

    .br-mobile {
        display: block;
    }
}

.br-pc-only {
    /* PCでは通常の改行として機能 */
}

@media (max-width: 768px) {
    .br-pc-only {
        display: none;
    }
}

/* Forcing line breaks on PC, hiding on mobile */
.pc-linebreak {
    display: block; /* Forces a line break on PC */
}

@media (max-width: 768px) {
    .pc-linebreak {
        display: none; /* Hides the line break on mobile */
    }
}

.crayon-divider {
    height: 15px;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 15"><path d="M0 7.5 Q 5 4.5, 10 7.5 T 20 7.5 T 30 7.5 T 40 7.5 T 50 7.5 T 60 7.5 T 70 7.5 T 80 7.5 T 90 7.5 T 100 7.5" stroke="%23388E3C" stroke-width="6" fill="none" stroke-linecap="round" /></svg>');
    background-repeat: repeat-x;
    background-position: center;
    margin: 20px 0;
    border: 0;
}

.umenoki-theme .crayon-divider {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 15"><path d="M0 7.5 Q 5 4.5, 10 7.5 T 20 7.5 T 30 7.5 T 40 7.5 T 50 7.5 T 60 7.5 T 70 7.5 T 80 7.5 T 90 7.5 T 100 7.5" stroke="%23FFA000" stroke-width="6" fill="none" stroke-linecap="round" /></svg>');
}

.garden-link-button {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.garden-link-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.garden-link-button h3 {
    margin: 0;
    font-size: 2em;
    position: relative;
    z-index: 1;
}

.garden-link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s;
}

.garden-link-button:hover::before {
    background-color: rgba(0, 0, 0, 0.1);
}

.nishiya-link.garden-link-button {
    background-image: url('images/nishiya.webp');
}

.umenoki-link.garden-link-button {
    background-image: url('images/umenoki.webp');
}