/*!
Theme Name: Sansyu Busan 2025
Theme URI: https://www.sansyu-busan.co.jp/
Description: 三州武産2025官方主题
Version: 3.0
Author: Your Name
Text Domain: sansyu-busan2025
*/

/* ======================
   基础重置
   ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    line-height: 1.7;
    color: #333;
    background: #fff;
    padding-top: 80px;
}

/* ======================
   Header样式
   ====================== */
.site-header {
    background: #fff;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* LOGO */
.site-logo img {
    height: 50px;
    width: auto;
}

/* ======================
   桌面导航
   ====================== */
.primary-menu {
    display: flex;
    list-style: none;
}

.primary-menu > li {
    position: relative;
    margin-left: 30px;
}

.primary-menu a {
    color: #333;
    padding: 10px;
    display: block;
    transition: color 0.3s;
}

/* 当前菜单项 */
.current-menu-item > a {
    color: #003366 !important;
    font-weight: bold;
}

/* 二级菜单 */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.primary-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
}

.sub-menu li {
    border-bottom: 1px solid #eee;
}

/* ======================
   移动端导航
   ====================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
}

.toggle-bar {
    display: block;
    width: 25px;
    height: 2px;
    background: #333;
    margin: 5px 0;
    transition: all 0.3s;
}

@media (max-width: 991px) {
    /* 汉堡按钮 */
    .mobile-menu-toggle {
        display: block;
    }

    /* 导航容器 */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s;
        padding-top: 80px;
        overflow-y: auto;
        z-index: 999;
    }

    .main-navigation.active {
        right: 0;
    }

    /* 菜单项 */
    .primary-menu {
        flex-direction: column;
        padding: 20px;
    }

    .primary-menu > li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .primary-menu a {
        padding: 15px 20px !important;
        position: relative;
    }

    /* 下拉箭头 */
    .menu-item-has-children > a::after {
        content: ">";
        position: absolute;
        right: 20px;
        transition: transform 0.3s;
    }

    /* 子菜单 */
    .sub-menu {
        position: static !important;
        box-shadow: none !important;
        background: #f8f9fa !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
        margin-left: 20px;
    }

    .submenu-open > .sub-menu {
        max-height: 1000px;
    }

    .submenu-open > a::after {
        transform: rotate(90deg);
    }
}

/* ======================
   主要内容区域
   ====================== */
.main-content {
    padding: 40px 0;
}

/* ======================
   底部样式
   ====================== */
.site-footer {
    background: #2a2a2a;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 编辑器内容统一样式 */
.greeting-content,
.business-media {
    img {
        max-width: 100%;
        height: auto;
        margin: 15px 0;
        border-radius: 8px;
    }
    
    a[href$=".jpg"], 
    a[href$=".png"], 
    a[href$=".gif"] {
        display: block;
        text-align: center;
    }
}


.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 40px 15px;
}

.business-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    
    &:hover {
        transform: translateY(-5px);
    }
    
    h3 {
        color: #2c3e50;
        margin: 15px 0 10px;
        font-size: 1.4em;
    }
    
    .detail-link {
        display: inline-block;
        padding: 8px 20px;
        background: #3498db;
        color: white !important;
        border-radius: 4px;
        text-decoration: none;
        margin-top: 15px;
        
        &:hover {
            background: #2980b9;
        }
    }
}


/* GREETING 部分 */
.greeting-section {
    display: flex;
    gap: 40px;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.greeting-content {
    flex: 1;
}

.greeting-image {
    flex: 1;
}

.greeting-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .greeting-section {
        flex-direction: column;
        padding: 30px 15px;
    }
}

/* ニュース */
.news-section {
    background: #f8f9fa;
    padding: 60px 20px;
}

.news-section article {
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-section time {
    color: #666;
    font-size: 0.9em;
}

/* ======================
   底部样式
   ====================== */
.site-footer {
    background: #333;
    color: #fff;
    padding: 40px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #fff;
}

.footer-section p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #ccc;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 14px;
    color: #ccc;
}

/* 响应式布局 */
@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}


/* ======================
   大图广告响应式样式
   ====================== */
.main-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 0 auto;
}

/* 桌面端样式 */
.main-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

/* 移动端样式 */
@media (max-width: 767px) {
  .main-banner {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.main-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

/* 手机端裁剪中间75% */
@media (max-width: 767px) {
  .main-banner {
    height: 60vh; /* 根据需求调整高度 */
  }
  
  .main-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.1); /* 放大确保中间区域可见 */
  }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
  .main-banner img {
    width: 100%; /* 更小的屏幕显示稍大 */
    border-radius: 8px;
  }
}


/* ======================
   内容页通用样式
   ====================== */
.page-template {
  padding: 40px 0;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 面包屑导航 */
.breadcrumb {
  margin-bottom: 30px;
  font-size: 14px;
  color: #666;
}

/* 主内容区 */
.content-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

.main-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 标题样式 */
.page-title {
  color: #003366;
  font-size: 2.2em;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

/* 特色图片 */
.featured-image {
  margin: 0 -30px 30px;
}

.responsive-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* 侧边栏 */
.sidebar {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
}

/* ======================
   响应式设计
   ====================== */
@media (max-width: 1024px) {
  .content-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .sidebar {
    order: -1;
    margin-bottom: 30px;
  }
}

@media (max-width: 767px) {
  .page-template {
    padding: 25px 0;
  }
  
  .main-content {
    padding: 20px;
  }
  
  .page-title {
    font-size: 1.8em;
  }
  
  .featured-image {
    margin: 0 -20px 20px;
  }
}