/*
Theme Name: Tonaream Theme
Author: TONAREAM株式会社
Version: 1.0
*/

/* =========================================
   アニメーション定義（ここが修正ポイント）
   ========================================= */

/* 下からふわっと表示させる動きの台本 */
@keyframes fadeInUpCustom {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 基本設定（JS無効時などの安全策：最初は見えるようにしておく） */
.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* JSが動いている時だけ適用される「待機状態（隠す）」 */
/* script.jsでこのクラスが付与された時だけ透明になります */
.fade-in.js-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* 表示スイッチが入った時の動作 */
.fade-in.animated {
    /* transition ではなく animation を使うことで強制的に動かします */
    animation: fadeInUpCustom 1.0s ease-out forwards;
    
    /* アニメーション開始前が一瞬チラつかないように初期値をセット */
    opacity: 0; 
}


/* =========================================
   以下、その他の既存スタイル
   ========================================= */

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #fffaf0;
    transition: background-color 0.5s;
}

.container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
}

header {
    background-color: #ffefd5;
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #ffd700;
    /* ヘッダーのアニメーションは既存のfadeInを使う */
    animation: fadeIn 1s ease-in-out;
}

header img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin: 10px 0 0 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #d2691e;
    font-weight: bold;
    padding: 5px 10px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

nav ul li a:hover {
    border-bottom: 2px solid #d2691e;
}

main {
    padding: 20px 0;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.center-image {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

.catchphrase-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background-color: #fffaf0;
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}

.catchphrase {
    color: #d2691e;
    font-size: 2em;
    font-weight: bold;
    margin: 0;
    /* ここは既存のアニメーションを使用 */
    animation: fadeInUp 1s ease-in-out;
}

.catchphrase-detail {
    color: #8b4513;
    font-size: 1.1em;
    margin: 10px 0 0 0;
    animation: fadeInUp 1s ease-in-out 0.5s;
}

.index-title {
    color: #d2691e;
    width: 400px;
    display: inline-block;
    text-align: center;
    border-bottom: 2px solid #d2691e;
    padding: 10px 0;
    margin: 20px auto;
    box-sizing: border-box;
}

.title {
    color: #d2691e;
    width: 100%;
    display: inline-block;
    text-align: center;
    border-bottom: 2px solid #d2691e;
    padding: 10px 0;
    margin: 20px auto;
    box-sizing: border-box;
}

.detail-text {
    color: #8b4513;
    background-color: #ffefd5;
    padding: 10px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    text-align: center;
    box-sizing: border-box;
}

.company-info-section {
    width: 100%;
    max-width: 800px;
    background-color: #fffaf0;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    box-sizing: border-box;
}

.company-info {
    width: 100%;
    border-collapse: collapse;
    box-sizing: border-box;
}

.company-info th, .company-info td {
    padding: 12px;
    text-align: left;
    color: #8b4513;
    box-sizing: border-box;
}

.company-info th {
    background-color: #ffdab9;
    font-weight: bold;
}

.company-info td {
    background-color: #ffefd5;
}

.contact-info-section {
    width: 100%;
    max-width: 800px;
    background-color: #fffaf0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    box-sizing: border-box;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 5px;
    color: #8b4513;
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ffe4b5;
    border-radius: 5px;
    background-color: #ffefd5;
    color: #8b4513;
    font-size: 1em;
    box-sizing: border-box;
}

.contact-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #d2691e;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
    box-sizing: border-box;
}

.contact-form button:hover {
    background-color: #ff4500;
}

.button-container {
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.apply-button {
    color: #ff4500;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid #ff4500;
    border-radius: 5px;
    background-color: #ffefd5;
    margin-top: 20px;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
}

.apply-button:hover {
    background-color: #ffd700;
    text-decoration: none;
}

footer {
    background-color: #ffefd5;
    text-align: center;
    padding: 10px 0;
    border-top: 2px solid #ffd700;
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
}

footer p {
    margin: 0;
    display: inline-block;
    color: #8b4513;
}

footer a {
    color: #d2691e;
    text-decoration: none;
    margin-left: 10px;
    border: none;
    padding: 0;
    background-color: transparent;
}

footer a:hover {
    text-decoration: underline;
}

/* メディアクエリ */
@media screen and (min-width: 768px) {
    header img {
        width: 80%;
    }

    .detail-text {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
    }

    .button-container {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
    }

    .catchphrase {
        white-space: normal;
    }
}

@media screen and (max-width: 767px) {
    .title-audition::after {
        white-space: pre;
        display: block;
    }

    .title-audition span {
        display: none;
    }

    .catchphrase {
        white-space: normal;
    }
}

/* パララックスエフェクト */
.parallax {
    /* 階層が同じ場合、このままでOK */
    background: url('background.jpg') no-repeat fixed center;
    background-size: cover;
}

/* 既存のアニメーション定義 */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ポップアップのスタイル */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 5px;
    text-align: center;
}

.popup p {
    margin: 0 0 10px;
}

.popup .close-popup {
    background-color: #d2691e;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
}

.popup .close-popup:hover {
    background-color: #ff4500;
}

.audition .button-container {
    margin-bottom: 30px;
}