/*
Theme Name: MySwell
Theme URI: https://example.com/myswell
Author: Your Name
Author URI: https://example.com
Description: シンプル美と機能性を両立したWordPressテーマ - SWELLインスパイア
Version: 1.0.0
License: GPL v2 or later
Text Domain: myswell
*/

/* ========================================
   CSS Variables
======================================== */
:root {
    --primary-color: #ff7300;
    --secondary-color: #6c757d;
    --accent-color: #17a2b8;
    --text-color: #333333;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0,0,0,0.15);
    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
    --font-heading: "Noto Sans JP", sans-serif;
    --transition: all 0.3s ease;
}

/* ========================================
   Reset & Base Styles
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0 !important;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* ========================================
   Layout Components
======================================== */
.container {
    max-width: 95% !important;
    margin: 0 auto;
}

.container-wide {
    max-width: 98%;
    margin: 0 auto;
}

.section {
    padding: 60px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 40px 0;
    }
}

/* ========================================
   Header Styles
======================================== */
#page {
    margin-top: 0 !important;
}

.site {
    margin-top: 0 !important;
}

.site-header {
    background: var(--bg-white);
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* フロントページのみ透明背景の絶対位置ヘッダー */
.home .site-header {
    background: transparent !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: none !important;
}
  /* モバイルではトップページのヘッダーも固定 */
  @media (max-width: 768px) {
      .home .site-header {
          position: fixed !important;
      }
  }

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.site-logo a {
    color: var(--text-color);
}

/* フロントページのみ白色 */
.home .site-logo,
.home .site-logo a {
    color: white;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* フロントページのみ白色 */
.home .main-navigation a {
    color: white;
}

.home .main-navigation a::after {
    background: white;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* フロントページのみ白色 */
.home .menu-toggle span {
    background: white;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: fixed;
        right: 20px;
        z-index: 10001;
		/* background-color: rgba(255, 133, 33, 0.7); */
    }

    .menu-close span {
		display: block;
	}
    
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 90%;
        height: 100vh;
        background: var(--bg-white);
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        padding: 2rem;
        flex-direction: column;
        padding-top: 40px;
		padding-bottom: 150px;
        overflow-y: auto;
        z-index: 1000;
		font-size: 18px;
    }
    
    .main-navigation.active {
        right: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0px;
    }
	
		.main-navigation a {
          padding: 20px 50px 20px 0px;
          display: block;       /* ブロック要素にしてwidth全体をタップ可能に */
          width: 100%;
      }

    /* トップページでもモバイルメニューの文字色を黒に */
    .home .main-navigation a {
        color: var(--text-color);
    }

	.menu-item-type-post_type{
	    padding: 0px !important;	
	}
}
}

/* ========================================
   Hero Section
======================================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--bg-white);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    opacity: 1;
}

/* ========================================
   Card Components
======================================== */
.card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.card-text {
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   Grid System
======================================== */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ========================================
   Content Styles
======================================== */
.content {
    margin: 0 auto;
}

.content h1, .content h2, .content h3, 
.content h4, .content h5, .content h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content h1 { font-size: 2.5rem; }
.content h2 { font-size: 2rem; }
.content h3 { font-size: 1.75rem; }
.content h4 { font-size: 1.5rem; }
.content h5 { font-size: 1.25rem; }
.content h6 { font-size: 1.125rem; }

.content p {
    margin-bottom: 1.5rem;
}

.content ul, .content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
}

/* ========================================
   Footer Styles
======================================== */
.site-footer {
    background: #ff8521;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    padding: 0.25rem 0;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* ========================================
   Animations
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ========================================
   Utility Classes
======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* ========================================
   Responsive Typography
======================================== */
@media (max-width: 768px) {
    html { font-size: 14px; }
    .content h1 { font-size: 2rem; }
    .content h2 { font-size: 1.75rem; }
}
/* ========================================

   Language Switcher
======================================== */
.language-switcher {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-left: auto;
    align-items: center;
}

.language-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 5px 10px;
    font-size: 14px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.language-link:hover {
    color: var(--primary-color);
}

.language-link.current {
    font-weight: bold;
    color: var(--primary-color);
}

/* フロントページのみ白色 */
.home .language-link {
    color: white;
}

.home .language-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Mobile responsive - ハンバーガーメニュー内に表示 */
@media (max-width: 768px) {
    .language-switcher {
        gap: 8px;
        margin-left: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
        width: 100%;
    }
    
    .language-link {
        font-size: 14px;
        padding: 8px 10px;
        width: 100%;
        color: var(--text-color);
    }
    
    /* モバイルメニュー内でも通常の色 */
    .home .language-link {
        color: var(--text-color);
    }
}

@media (max-width: 768px) {
  /* Container adjustments */
  [class*="-section"], section { padding: 5px !important; }
  .container { max-width: 100% !important; padding: 0 5px !important; }

  /* Typography */
  h1 { font-size: 1.8em !important; }
  h2 { font-size: 1.5em !important; }
  h3 { font-size: 1.3em !important; }
  h4, h5, h6 { font-size: 1.1em !important; }
  p, li { font-size: 1em !important; line-height: 1.6 !important; }

  /* Grid layouts */
  [style*="display: grid"], [style*="display:grid"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  /* Flex layouts */
  [style*="display: flex"], [style*="display:flex"] {
    flex-direction: column !important;
    gap: 15px !important;
  }

  /* Cards and boxes */
  [class*="card"], [class*="box"], [class*="item"] {
    padding: 20px 15px;
    margin-bottom: 15px;
  }

  /* Images */
  img { max-width: 100% !important; height: auto !important; }

  /* Buttons and links */
  a[style*="padding"], button {
    padding: 12px 20px;
    font-size: 1em;
  }

  /* Tables */
  table { font-size: 0.85em !important; }
  table th, table td { padding: 8px 4px !important; }

  /* Specific padding adjustments */
  [style*="padding: 80px"] { padding: 40px 5px !important; }
  [style*="padding: 60px"] { padding: 30px 5px !important; }
  [style*="padding: 50px"] { padding: 30px 5px !important; }
  [style*="padding: 40px"] { padding: 25px 5px !important; }
  [style*="padding: 30px"] { padding: 20px 5px !important; }
}

