/* css/style.css - 終極修正版 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

:root {
    --primary: #d32f2f;
    --krav-red: #a70000; 
    --black: #000000;
    --dark-gray: #1a1a1a;
    --white: #ffffff;
    --light-gray-bg: #f9f9f9;
    --border-gray: #e6e6e6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Noto Sans TC', sans-serif; 
    line-height: 1.6; 
    background: var(--black); 
    padding-top: 110px; 
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; }
.section-padding { padding: 60px 0; }
.text-center { text-align: center; }
.bg-black { background: #000; color: #fff; }
.bg-krav-red { background: var(--krav-red); color: #fff; }
.bg-white { background: #f9f9f9; color: #333; }
.relative { position: relative; z-index: 2; }
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.overlay-black { position: absolute; inset: 0; background: rgba(0,0,0,0.8); }

/* 标题 */
.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head h2 { font-size: 28px; font-weight: 700; margin-bottom: 15px; text-transform: uppercase; }
.sec-head .line { width: 50px; height: 3px; background: var(--primary); margin: 0 auto 15px; }
.sec-head .white-line { background: #fff; }
.sec-head p { font-size: 14px; color: #666; }
.sec-head.dark h2 { color: #fff; }
.sec-head.dark p { color: #ccc; }

/* 1. Fixed Header */
.fixed-header-wrapper { position: fixed; top: 0; left: 0; width: 100%; z-index: 9999; }

/* 1.1 Top Bar */
.top-bar { background: #2b2b2b; border-top: 3px solid var(--primary); color: #ccc; font-size: 12px; height: 40px; line-height: 40px; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-nav { display: flex; }
.top-nav > li { position: relative; margin-right: 20px; }
.top-nav > li > a { color: #ddd; display: block; }
.top-nav > li > a:hover { color: var(--primary); }
.top-contact { color: #fff; font-weight: bold; }
.top-contact .phone-num { color: var(--primary); margin-left: 5px; }

/* 下拉菜单 */
.dropdown {
    position: absolute; top: 100%; left: 0; 
    background: #333; min-width: 180px; z-index: 10000;
    visibility: hidden; opacity: 0; transition: 0.3s;
    box-shadow: 0 5px 10px rgba(0,0,0,0.5);
    border-top: 2px solid var(--primary);
}
.has-drop:hover .dropdown { visibility: visible; opacity: 1; }
.dropdown li { border-bottom: 1px solid #444; line-height: 1.5; }
.dropdown a { display: block; padding: 10px; color: #ccc; }
.dropdown a:hover { background: #444; color: #fff; }

/* 1.2 Main Header */
header { background: #000; height: 75px; border-bottom: 1px solid #d32f2f; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }

/* Logo */
.logo img { 
    height: 60px; 
    border: none; 
    padding: 0; 
    margin-top: 5px; 
}

.nav-menu ul { display: flex; align-items: center; gap: 0; }
.nav-menu a { color: #fff; font-size: 14px; font-weight: 500; padding: 0 15px; display: block; height: 70px; line-height: 70px; }
.nav-menu a:hover, .nav-menu a.active { background: #111; color: var(--primary); }
.search-btn { color: #fff; padding: 0 15px; cursor: pointer; }
.mobile-toggle { display: none; color: #fff; font-size: 24px; cursor: pointer; }

/* Hero */
.hero-section { 
    height: 65vh;
    background-size: cover; background-position: center top; 
    position: relative; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; 
}
.overlay-dark { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.sub-title { font-size: 18px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 5px; color: #ddd; font-weight: 400; }
.main-title { font-size: 42px; font-weight: 900; margin-bottom: 10px; letter-spacing: 1px; }
.intro-title { font-size: 20px; margin-bottom: 20px; font-weight: normal; color: #f0f0f0; }
.desc-text-block p { font-size: 15px; margin-bottom: 3px; color: #ddd; line-height: 1.5; }
.highlight-box { font-size: 18px; font-weight: bold; margin-top: 15px; color: #fff; }
.hero-btns { margin-top: 30px; }
.btn-red { background: var(--primary); color: #fff; padding: 12px 40px; font-weight: bold; border-radius: 3px; font-size: 16px; }

/* 2. 防衛原則 */
.principles-section { 
    background-color: #000;
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://www.kravmaga.hk/images/06/66.jpg');
    background-size: 60% auto; 
    background-position: center center;
    background-repeat: no-repeat;
    padding: 80px 0;
    border-top: 15px solid #333333;
    border-bottom: 15px solid #333333;
    color: #fff;
}

.principles-section .sec-head h2 { color: #fff; }
.principles-section .sec-head p { color: #ccc; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }

/* 卡片样式 */
.principle-card { 
    text-align: center; 
    padding: 40px 20px; 
    background: #000; 
    border: 1px solid #fff; 
    border-radius: 10px; 
    color: #fff; 
    transition: 0.3s; 
    box-shadow: none;
}

.principle-card:hover { 
    background: var(--primary); 
    border-color: var(--primary);
    transform: none; 
} 

.principle-card i { font-size: 50px; color: #fff; margin-bottom: 25px; transition: 0.3s; }
.principle-card h3 { font-size: 20px; font-weight: bold; margin-bottom: 15px; color: #fff; }
.principle-card p { font-size: 14px; color: #ccc; line-height: 1.6; transition: 0.3s; }

.principle-card:hover i,
.principle-card:hover h3,
.principle-card:hover p { color: #fff; }

/* 技術體系 */
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.sys-item { text-align: center; padding: 25px 10px; background: #111; border: 1px solid #222; transition: 0.3s; }
.sys-item:hover { background: var(--primary); }
.sys-item i { font-size: 28px; color: #fff; margin-bottom: 10px; }
.sys-item h4 { color: #fff; font-size: 14px; margin-bottom: 5px; }
.sys-item p { font-size: 12px; color: #aaa; }

/* 教官團隊 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.instructor-card { background: #111; }
.instructor-card img { width: 100%; height: 350px; object-fit: cover; object-position: top; }
.inst-info { padding: 20px; text-align: center; color: #fff; }
.inst-info h3 { color: #fff; font-size: 18px; margin-bottom: 5px; }
.inst-info p { color: #ccc; font-size: 14px; margin-bottom: 10px; }
.socials i { color: #ccc; margin: 0 5px; font-size: 14px; }

/* 專家教官 */
.expert-center-sec { background: #000; padding-bottom: 80px; }
.expert-circle-img { margin-bottom: 20px; }
.expert-circle-img img { width: 140px; height: 140px; border-radius: 50%; border: 4px solid var(--primary); object-fit: cover; margin: 0 auto; }
.expert-title { font-size: 24px; color: #fff; margin-bottom: 5px; font-weight: bold; }
.expert-subtitle { color: var(--primary); font-size: 16px; margin-bottom: 20px; font-weight: normal; }
.expert-text-block p { color: #ccc; font-size: 14px; margin-bottom: 8px; }
.role-highlight { color: #fff; font-size: 18px; margin-top: 30px; border-top: 1px solid #333; padding-top: 20px; display: inline-block; }

/* 發展經歷 (bg-krav-red) - 修正版 */
.history-content-block p { margin-bottom: 10px; font-size: 15px; line-height: 1.8; }
.stats-row { display: flex; justify-content: center; gap: 40px; margin: 30px 0; }
.stat-box strong { font-size: 36px; display: block; line-height: 1; }
.stat-box span { font-size: 12px; opacity: 0.8; }

/* 修正布局：圖片放大(佔比增加)，並強制上下對齊(stretch) */
.history-split { 
    display: grid; 
    grid-template-columns: 0.9fr 1.1fr; /* 左側文字0.9，右側圖片1.1 (放大圖片區域) */
    gap: 40px; 
    align-items: stretch; /* 關鍵：強制左右兩欄高度一致(上下對齊) */
}

/* 左側文字垂直居中 */
.history-left {
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

.history-left h3 { font-size: 18px; font-weight: bold; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 10px; }
.service-list { font-size: 14px; line-height: 1.8; margin-bottom: 15px; }
.service-note { font-size: 14px; opacity: 0.8; }

/* 圖片樣式：填滿高度，cover裁剪保證不變形 */
.bordered-img { 
    border: 8px solid #fff; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    width: 100%; 
    height: 100%;       /* 高度100%以匹配左側文字高度 */
    object-fit: cover;  /* 確保圖片放大填充且不變形 */
    display: block;
}

/* 價格計劃 */
.pricing-bg { background-size: cover; background-position: center; position: relative; }
.pricing-gap { gap: 20px; align-items: center; max-width: 1000px; margin: 0 auto; }
.price-card { padding: 40px 15px; text-align: center; position: relative; transition: 0.3s; border-radius: 10px; overflow: hidden; }
.gray-card { background: #1a1a1a; color: #fff; border: 1px solid #333; box-shadow: 0 5px 15px rgba(0,0,0,0.5); z-index: 1; }
.red-card { background: var(--primary); color: #fff; transform: scale(1.05); z-index: 2; box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.p-title { font-size: 16px; margin-bottom: 15px; font-weight: bold; }
.p-price { font-size: 28px; font-weight: 900; margin-bottom: 5px; }
.p-unit { font-size: 12px; margin-bottom: 25px; opacity: 0.8; }
.p-list { text-align: left; padding-left: 15px; margin-bottom: 30px; list-style: none; }
.p-list li { margin-bottom: 10px; font-size: 12px; position: relative; border-bottom: 1px dashed rgba(255,255,255,0.2); padding-bottom: 5px; }
.gray-card .p-list li { border-bottom: 1px dashed rgba(255,255,255,0.1); }
/* 價格卡片按鈕 (增加 hover 變色) */
.btn-price-gray { 
    border: 1px solid #fff; 
    color: #fff; 
    padding: 8px 20px; 
    display: inline-block; 
    font-size: 12px; 
    border-radius: 3px; 
    transition: 0.3s; /* 平滑過渡 */
    cursor: pointer;
}
/* 灰色卡片按鈕懸停：背景變白，字變黑 */
.btn-price-gray:hover { 
    background: #fff; 
    color: #000; 
}

.btn-price-white { 
    background: #fff; 
    color: var(--primary); 
    padding: 8px 20px; 
    display: inline-block; 
    font-weight: bold; 
    font-size: 12px; 
    border-radius: 3px; 
    transition: 0.3s; /* 平滑過渡 */
    cursor: pointer;
}
/* 紅色卡片按鈕懸停：背景變黑，字變白 */
.btn-price-white:hover { 
    background: #000; 
    color: #fff; 
}

/* 視頻 */
.video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.vid-border { border: 1px solid #333; padding: 5px; }
.vid-border video { width: 100%; display: block; }
.join-title { font-size: 24px; color: #fff; margin-bottom: 10px; }
.comfort-title { color: #fff; font-size: 36px; margin-bottom: 20px; font-weight: 900; }
.video-text-right p { color: #888; margin-bottom: 10px; font-size: 14px; }
.contact-block { margin-top: 30px; border-top: 1px solid #222; padding-top: 20px; }
.contact-block h4 { color: #fff; margin-bottom: 10px; }
.contact-block p { font-size: 13px; color: #666; margin-bottom: 5px; }
.contact-block .phone { font-size: 18px; color: var(--primary); font-weight: bold; }

/* 新闻板块样式 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1000px; margin: 0 auto; }
.news-card { 
    background: #fff; 
    padding: 20px; 
    border-left: 4px solid #ddd; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    display: flex; 
    align-items: center; 
    transition: 0.3s;
}
.news-card:hover { border-left-color: var(--primary); transform: translateX(5px); }

.news-tag { 
    display: inline-block; 
    font-size: 12px; 
    background: #eee; 
    padding: 3px 8px; 
    margin-right: 15px; 
    color: #666; 
    border-radius: 3px; 
    white-space: nowrap; 
}
.news-tag.red { background: var(--primary); color: #fff; }
.news-tag.green { background: #07c160; color: #fff; }

.news-title { 
    flex: 1; 
    font-size: 16px; 
    font-weight: bold; 
    color: #333; 
    text-decoration: none; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}
.news-title:hover { color: var(--primary); }

.news-date { 
    font-size: 13px; 
    color: #999; 
    margin-left: 15px; 
    white-space: nowrap; 
}

/* Footer */
footer { background: #000; padding: 50px 0 20px; color: #888; font-size: 13px; border-top: 1px solid #222; }
.foot-main { border-bottom: 1px solid #222; padding-bottom: 30px; margin-bottom: 20px; }
.foot-contact-title { font-size: 20px; font-weight: bold; color: #fff; margin-bottom: 20px; }
.foot-address-grid { display: flex; flex-wrap: wrap; gap: 30px; }
.addr-item p { margin-bottom: 5px; }
.addr-item .phone { color: #fff; font-weight: bold; }
.foot-qrcode { margin-top: 20px; }
.foot-bottom-links { text-align: center; margin-bottom: 20px; }
.foot-bottom-links a { color: #888; margin: 0 10px; font-size: 14px; }
.foot-bottom-links a:hover { color: var(--primary); }
.copyright { text-align: center; font-size: 12px; color: #555; }

/* 响应式 */
@media (max-width: 768px) {
    /* 1. 调整 Body 顶部留白 */
    /* 因为顶部导航出来了，头变得更具高度，所以内容要往下推，防止被遮挡 */
    body { 
        padding-top: 160px; /* Header 70px + Top Bar 约90px */
    } 

    /* 2. 顶部固定容器 */
    .fixed-header-wrapper { 
        position: fixed; 
        top: 0; left: 0; width: 100%; z-index: 9999;
    } 

    /* 3. 显示 Top Bar (关键修改：改为显示) */
    .top-bar { 
        display: block; /* 取消隐藏 */
        height: auto;   /* 高度自动，适应内容折行 */
        padding: 10px 0;
        font-size: 11px; /* 手机端字体稍小 */
        line-height: 1.5;
    }

    /* Top Bar 内部布局适配 */
    .top-bar-inner { 
        flex-direction: column; /* 上下垂直排列 */
        gap: 8px;
    }

    /* 顶部链接群组适配 */
    .top-nav {
        flex-wrap: wrap; /* 允许换行 */
        justify-content: center; /* 居中对齐 */
        gap: 10px; /* 间距 */
    }
    
    .top-nav > li { margin-right: 0; }
    
    /* 紧急联系电话单独一行 */
    .top-contact { margin-top: 5px; }

    /* 4. 显示手机菜单按钮 (汉堡菜单) */
    .mobile-toggle { 
        display: block; 
        color: #fff;
        font-size: 24px;
        cursor: pointer;
        padding: 10px;
    }

    /* 5. 手机端主导航菜单 */
    .nav-menu { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: #000; 
        padding: 20px 0;
        border-top: 1px solid #333;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    .nav-menu.active { display: block; }

    .nav-menu ul { 
        flex-direction: column; 
        gap: 0;
    }

    .nav-menu a { 
        height: auto; 
        line-height: 50px; 
        border-bottom: 1px solid #222;
        padding-left: 20px;
        display: block;
    }

    /* 6. 其他板块适配 */
    .header-inner { height: 70px; padding: 0 15px; }
    
    .grid-4, .grid-5, .grid-3, .grid-2, .history-split, .video-split, .pricing-gap { 
        grid-template-columns: 1fr; 
        flex-direction: column; 
        gap: 30px; 
    }
    
    .red-card { transform: scale(1); margin: 20px 0; }
    
    .foot-address-grid { 
        flex-direction: column; 
        gap: 20px; 
    }
    
    .foot-bottom-links a { 
        display: block; 
        margin: 10px 0; 
    }
    
    /* 手机端新闻卡片适配 */
    .news-card { flex-wrap: wrap; }
    .news-title { width: 100%; margin: 8px 0; white-space: normal; }
    .news-date { margin-left: 0; font-size: 12px; }
}

/* === 新增 Footer 独立样式 (请粘贴在 style.css 最末尾) === */

/* 1. 电脑端默认样式：横向排列 (三列) */
.kmcn-footer-container {
    display: flex;
    justify-content: space-between; /* 两端对齐 */
    align-items: flex-start; /* 顶部对齐 */
    gap: 30px; /* 列间距 */
    color: #888;
    font-size: 13px;
    margin-top: 20px;
}

.kmcn-footer-item {
    flex: 1; /* 自动填充宽度 */
}

.kmcn-footer-item p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.kmcn-footer-item .phone-text {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
}

/* 二维码列特殊处理 */
.kmcn-qr-code {
    flex: 0 0 auto; /* 固定宽度，不伸缩 */
    text-align: center;
}

.kmcn-qr-code img {
    width: 100px;
    height: 100px;
    border: 2px solid #fff;
    border-radius: 50%; /* 圆形 */
    display: block;
    margin: 0 auto; /* 图片居中 */
}

/* 2. 手机端适配样式：纵向排列 (三行) */
@media (max-width: 768px) {
    .kmcn-footer-container {
        flex-direction: column; /* 关键：改为垂直堆叠 */
        gap: 40px; /* 增加行间距 */
    }

    .kmcn-footer-item {
        width: 100%;
        text-align: left; /* 文字左对齐 */
    }

    /* 手机端二维码也改为左对齐 */
    .kmcn-qr-code {
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .kmcn-qr-code img {
        margin: 0; /* 取消居中，靠左显示 */
    }
}
/* =========================================
   新頁面樣式：什麼是以色列馬伽術 (About Page)
   ========================================= */

/* =========================================
   Kravmaga.html 頁面專屬復刻樣式
   ========================================= */

/* 1. KMCN簡介區塊 (菱形樣式) */
.intro-box-dark {
    background: #252525; /* 深色方塊背景 */
    height: 300px; /* 固定高度 */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}
.intro-box-dark:hover { background: #1a1a1a; }

/* 菱形容器 */
.diamond-wrapper {
    width: 160px;
    height: 160px;
    transform: rotate(45deg); /* 旋轉45度 */
    overflow: hidden;
    border: 3px solid #d32f2f; /* 紅色邊框 */
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    background: #000;
}

/* 菱形內的圖片 (反向旋轉復原) */
.diamond-wrapper img {
    width: 150%; 
    height: 150%;
    transform: rotate(-45deg) translate(-17%, -17%); /* 反旋轉並修正位置 */
    object-fit: cover;
}

/* 2. 防衛原則區塊 (復刻圖二/四) */
.principles-section-custom {
    background-color: #000;
    /* 確保背景圖覆蓋、居中、暗色遮罩效果由原圖自帶或疊加 */
    background-size: cover; 
    background-position: center;
    padding: 80px 0;
    border-top: none; /* 去掉之前的灰條 */
    border-bottom: none;
    color: #fff;
}
.principle-gap-fix { gap: 40px; }

/* 紅色卡片 (第一個) */
.principle-card-red {
    background: #a70000; /* 深紅色背景 */
    border: 1px solid #d32f2f;
    border-radius: 15px; /* 圓角 */
    padding: 40px 20px;
    text-align: center;
    color: #fff;
    transition: 0.3s;
}
.principle-card-red:hover { transform: translateY(-5px); box-shadow: 0 5px 20px rgba(167,0,0,0.5); }

/* 黑色卡片 (後三個) */
.principle-card-black {
    background: rgba(0,0,0,0.6); /* 半透明黑底 */
    border: 1px solid #666; /* 灰色邊框 */
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    color: #fff;
    transition: 0.3s;
}
.principle-card-black:hover { 
    border-color: #fff; 
    background: rgba(0,0,0,0.8);
    transform: translateY(-5px); 
}

/* 圖標樣式 */
.p-icon i { font-size: 50px; margin-bottom: 20px; color: #fff; }
.principle-card-red h3, .principle-card-black h3 { font-size: 20px; font-weight: bold; margin-bottom: 10px; }
.principle-card-red p, .principle-card-black p { font-size: 13px; font-weight: bold; } /* 復刻圖中的加粗小字 */


/* 響應式適配 (菱形和卡片) */
@media (max-width: 768px) {
    .grid-3-custom, .grid-4 { 
        grid-template-columns: 1fr; /* 手機端單列 */
        gap: 30px;
    }
    .intro-box-dark { height: 250px; } /* 手機端高度縮小 */
    .diamond-wrapper { width: 140px; height: 140px; }
    
    .principle-card-red, .principle-card-black { 
        padding: 30px 15px; 
        margin-bottom: 10px;
    }
}