/*
Theme Name: SWELL Child - Golf Gakko
Theme URI: 
Description: SWELL子テーマ（ゴルフ学校用カスタマイズ）
Author: 
Author URI: 
Template: swell
Version: 1.0.0
*/

/* ===================================
   golf-gakkoテーマから移植した装飾CSS
   =================================== */

/* ボックス装飾 */
.box29 {
    position: relative;
    margin: 2em 0;
    padding: 1.5em;
    border: solid 3px #009000;
}

.box29 .box-title {
    position: absolute;
    display: inline-block;
    top: -27px;
    left: -3px;
    padding: 0 9px;
    height: 25px;
    line-height: 25px;
    font-size: 17px;
    background: #009000;
    color: #ffffff;
    font-weight: bold;
    border-radius: 5px 5px 0 0;
}

/* 注意書きボックス */
.attention {
    padding: 20px;
    border: 2px solid #f39800;
    background: #fff9e5;
    margin: 20px 0;
    border-radius: 5px;
}

.attention.a-2 {
    border-color: #d32f2f;
    background: #ffebee;
}

.attention.a-3 {
    border-color: #0288d1;
    background: #e3f2fd;
}

/* ポイントボックス */
.point {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.point a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none;
    position: relative;
}

.point a:hover {
    background: #f5f5f5;
}

.point a i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* 背景付きボックス */
.post-bg {
    background-color: #FDF5E0;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

/* アイキャッチ画像（ショートコード用） */
.eyecatch-img {
    width: 80px;
    height: 80px;
    float: left;
    margin-right: 15px;
}

.eyecatch-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* マーカー風装飾 */
.marker {
    background: linear-gradient(transparent 40%, #ffff66 40%);
    padding: 0 2px;
}

/* 緑色強調テキスト */
.green {
    color: #009000;
    font-weight: bold;
}

.green:before {
    content: "\f058";
    font-family: "FontAwesome";
    margin-right: 5px;
}

/* 装飾テキスト */
.deco-text {
    background: #fffbf0;
    border-left: 5px solid #ffa500;
    padding: 10px 15px;
    margin: 20px 0;
    position: relative;
}

.deco-text:before {
    content: "\f0eb";
    font-family: "FontAwesome";
    color: #ffa500;
    position: absolute;
    left: -25px;
    top: 10px;
}

/* リンクボタン */
.linkbtn {
    display: inline-block;
    padding: 10px 30px;
    background: #009000;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.linkbtn:hover {
    background: #007000;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* CTA関連 */
.post-cta {
    background: #fffbf0;
    border: 2px solid #ffa500;
    padding: 30px;
    margin: 30px 0;
    border-radius: 10px;
    text-align: center;
}

.cta-post-title {
    font-size: 28px;
    color: #009000;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.4;
}

.cta-button {
    display: inline-block;
    padding: 15px 50px;
    background: linear-gradient(to bottom, #ff6b00, #ff4500);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.cta-title {
    display: inline-block;
    background: #ff6b00;
    color: #fff;
    padding: 10px 30px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 30px 30px 0 0;
    margin-bottom: -2px;
    position: relative;
}

.cta-title:after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 0 10px;
    border-color: #ff6b00 transparent transparent transparent;
}

/* YouTube埋め込み（レスポンシブ対応） */
.post-cta-youtube {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 20px 0;
}

.post-cta-youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* アニメーション付き画像ボックス */
.img_box {
    animation: img-up-down 2s ease-in-out infinite;
}

@keyframes img-up-down {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ギミックレイアウト */
.gimikku {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.gimikkuright {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    margin: 20px 0;
}

/* カテゴリー専用装飾（ロングドライブ） */
.longdrive .anchor-link {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
    margin: 10px 0;
    text-decoration: none;
    transition: all 0.3s;
}

.longdrive .anchor-link:hover {
    background: #eee;
    transform: translateX(5px);
}

.longdrive .deco-text:before {
    content: "\f0eb";
    color: #ff6b00;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .eyecatch-img {
        width: 60px;
        height: 60px;
    }
    
    .cta-post-title {
        font-size: 22px;
    }
    
    .cta-button {
        font-size: 16px;
        padding: 12px 30px;
    }
    
    .gimikku,
    .gimikkuright {
        flex-direction: column;
    }
}

/* ===================================
   カスタムヘッダーHTML用CSS
   =================================== */

/* ヘッダー直前のEEAT対策エリア */
.golf-gakko-before-header {
    background: #f8f8f8;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.golf-gakko-before-header .scroll {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.golf-gakko-before-header .f-logo {
    height: 40px;
    margin: 0 10px;
    vertical-align: middle;
}

.golf-gakko-before-header table {
    max-width: 800px;
    margin: 30px auto;
    background: #fff;
    border: 1px solid #ddd;
    border-collapse: collapse;
}

.golf-gakko-before-header table th,
.golf-gakko-before-header table td {
    padding: 12px 20px;
    border: 1px solid #ddd;
    text-align: left;
}

.golf-gakko-before-header table th {
    background: #f5f5f5;
    font-weight: bold;
    width: 30%;
}

/* カスタムナビゲーション */
.golf-gakko-header-nav #gnav {
    background: #009000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.golf-gakko-header-nav #gnav-container {
    max-width: 1200px;
    margin: 0 auto;
}

.golf-gakko-header-nav #gnav-ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.golf-gakko-header-nav #gnav-ul li {
    margin: 0;
    position: relative;
}

.golf-gakko-header-nav #gnav-ul li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.golf-gakko-header-nav #gnav-ul li a:hover {
    background: rgba(0,0,0,0.1);
}

/* カテゴリー別の色分け */
.golf-gakko-header-nav #gnav-ul li.swing a:hover {
    background: #ff6b00;
}

.golf-gakko-header-nav #gnav-ul li.rules a:hover {
    background: #0066cc;
}

.golf-gakko-header-nav #gnav-ul li.golfclub a:hover {
    background: #9900cc;
}

.golf-gakko-header-nav #gnav-ul li.longdrive a:hover {
    background: #cc0000;
}

.golf-gakko-header-nav #gnav-ul li.missshot-resolution a:hover {
    background: #ff3366;
}

.golf-gakko-header-nav #gnav-ul li.ad-contact a {
    background: #ff6b00;
    font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .golf-gakko-before-header .f-logo {
        height: 30px;
        margin: 0 5px;
    }
    
    .golf-gakko-before-header table {
        font-size: 14px;
    }
    
    .golf-gakko-before-header table th,
    .golf-gakko-before-header table td {
        padding: 8px 12px;
    }
    
    .golf-gakko-header-nav #gnav-ul {
        flex-direction: column;
    }
    
    .golf-gakko-header-nav #gnav-ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .golf-gakko-header-nav #gnav-ul li a {
        padding: 12px 15px;
    }
}

/* ===================================
   SWELLグローバルナビ拡張CSS
   =================================== */

/* SWELLのグローバルナビで多数のメニュー項目に対応 */
.l-header__gnav {
    overflow: visible !important;
    height: auto !important;
}

.l-header__gnav .c-gnav {
    overflow: visible !important;
    max-width: 100% !important;
    height: auto !important;
}

/* グローバルナビのコンテナ設定 */
.l-header__gnav .l-container {
    max-width: 100% !important;
    padding: 0 20px !important;
}

.l-header__gnav .c-gnav__menu {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* メニュー項目が多い場合の調整 */
.l-header__gnav .c-gnav__menu > li {
    flex: 0 0 auto !important;
    min-width: auto !important;
    margin: 0 !important;
    display: inline-flex !important;
}

/* メニュー項目のパディング調整（はみ出し防止） */
.l-header__gnav .c-gnav__menu > li > a {
    padding: 12px 16px !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    font-size: 14px !important;
}

/* グローバルナビコンテナの最大幅設定 */
.l-header__inner {
    max-width: 100% !important;
}

/* ヘッダーナビゲーションエリアの調整 */
.l-header--pc .l-header__gnav {
    padding: 0 !important;
}

/* 改行時の見た目を整える */
.l-header__gnav .c-gnav__menu {
    line-height: 1 !important;
}

/* ドロップダウンメニューの階層制限を解除 */
.c-gnav__menu .sub-menu {
    display: block !important;
}

.c-gnav__menu .sub-menu .sub-menu {
    display: block !important;
    left: 100%;
    top: 0;
}

/* ドロップダウンメニューの位置調整（改行対応） */
.l-header__gnav .c-gnav__menu > li {
    position: relative !important;
}

.l-header__gnav .c-gnav__menu .sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 999 !important;
}

/* モバイルメニューでも全項目を表示 */
@media (max-width: 959px) {
    .p-spMenu__nav .menu-item {
        display: block !important;
    }

    .p-spMenu__nav .sub-menu {
        display: block !important;
        max-height: none !important;
    }
}

/* ===================================
   記事内リンク・画像リンクの修正
   =================================== */

/* 記事内のすべてのリンクがクリック可能であることを保証 */
.post-content a,
.entry-content a,
article a,
.wp-block-image a,
.wp-block-gallery a,
p a,
div a {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 1 !important;
}

/* 記事内の画像リンクを確実にクリック可能にする */
.post-content a img,
.entry-content a img,
article a img,
.wp-block-image a img,
.wp-block-gallery a img,
p a img,
div a img {
    pointer-events: none !important;
    cursor: pointer !important;
}

/* lazyload画像を含むリンクも確実にクリック可能に */
a img.lazyload,
a img.lazyloading,
a img.lazyloaded {
    pointer-events: none !important;
}

/* リンク要素自体はクリック可能 */
a:has(img),
a:has(img.lazyload),
a:has(img.lazyloading),
a:has(img.lazyloaded) {
    pointer-events: auto !important;
    cursor: pointer !important;
    display: inline-block !important;
    position: relative !important;
    z-index: 1 !important;
}

/* noscriptタグが干渉しないようにする */
noscript {
    pointer-events: none !important;
}

/* SVG画像の表示崩れ防止 */
img[src$=".svg"],
img[src*=".svg?"],
img[data-src$=".svg"],
img[data-src*=".svg?"] {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    display: inline-block !important;
}

/* lazyload SVG画像の安定化 */
img.lazyload[src$=".svg"],
img.lazyloading[src$=".svg"],
img.lazyloaded[src$=".svg"],
img.lazyload[data-src$=".svg"],
img.lazyloading[data-src$=".svg"],
img.lazyloaded[data-src$=".svg"] {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
}

/* SVG画像を含むリンクのレイアウト調整 */
a img[src$=".svg"],
a img[data-src$=".svg"] {
    vertical-align: middle !important;
}