/* ----- ヘッダー部分のスタイル ----- */
.content-header, .page_header {
    position: static !important; /* 固定位置を強制的に解除 */
    top: auto !important;
    left: auto !important;
    width: auto !important;
    z-index: auto !important;
    background: none !important;
    box-shadow: none !important;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #825724;
}

.content-title, .page_title {
    display: flex;
    align-items: center;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.content-title i, .page_title i {
    margin-right: 10px;
    color: #825724;
}

.content-title span, .page_title span {
    color: #825724;
}

.archive_description {
    color: #666;
    font-size: 1em;
}

/* 広告ページのスタイル */
.ad_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.ad_item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #fff;
    position: relative;
}

.ad_item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 広告の画像部分のスタイル調整 */
.ad_image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    cursor: pointer;
}

.ad_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* 再生ボタンのスタイル */
.play_button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 4rem;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.ad_item:hover .play_button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* ビデオモーダルのスタイル */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    width: 80%;
    max-width: 800px;
    padding: 20px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

#video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 アスペクト比 */
    height: 0;
    overflow: hidden;
    background-color: #000;
}

#video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ad_content {
    padding: 14px;
    position: relative;
    z-index: 2;
}

.ad_title {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.ad_item:hover .ad_title {
    color: #ff6b6b;
}

.ad_meta {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
    flex-direction: column;
    gap:10px;
}

.ad_meta span {
    display: inline-flex;
    align-items: center;
}

.ad_meta i {
    margin-right: 5px;
    color: #825725;
}

.ad_description {
    color: #666;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* データが存在しない場合のメッセージスタイル */
.no-ads {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0 40px;
}

.no-ads p {
    font-size: 1.2em;
    color: #666;
    margin: 0;
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
    .ad_grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .ad_grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .play_button {
        font-size: 3rem;
    }
}

/* 縦長動画（ショート）用のスタイル */
.vertical-video #video-container {
    width: 45vh;
    max-width: 90%;
    padding-bottom: 80vh;
    margin: 0 auto;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
    }
    
    .vertical-video #video-container {
        width: 100%;
        padding-bottom: 70vh;
    }
    
    .play_button {
        font-size: 3rem;
    }
}
