/*
Theme Name: BBINFO Thailand
Theme URI: https://bbinfoth.com
Author: Asias
Author URI: https://asias9.com
Description: タイで日本のテレビを見るならBBINFO - モダンでシンプルなデザイン
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bbinfo
*/

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

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

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
  line-height: 1.8;
  color: #333;
  background: #fff;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #d82800;
  text-decoration: none;
  transition: all 0.3s;
}

a:hover {
  color: #ff6347;
}

/* =====================
   Header
   ===================== */
.site-header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.site-logo {
  font-size: 28px;
  font-weight: 700;
  color: #d82800;
}

.site-logo a {
  color: #d82800;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.main-nav a {
  color: #333;
  font-weight: 500;
  font-size: 15px;
  padding: 8px 0;
}

.main-nav a:hover {
  color: #d82800;
}

/* モバイルメニュー */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* =====================
   Hero Section
   ===================== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  color: #fff;
  text-align: center;
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ヒーローカルーセル */
.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(45, 45, 68, 0.75) 100%);
  z-index: 1;
}

/* カルーセルドット */
.carousel-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.carousel-dot.active {
  background: #ffd700;
  border-color: #fff;
  transform: scale(1.2);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>');
  opacity: 0.3;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero p {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.9;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 50px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 64px;
  font-weight: 700;
  color: #ffd700;
  display: block;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.5;
  display: block;
}

/* =====================
   Buttons
   ===================== */
.btn {
  display: inline-block;
  padding: 15px 40px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.btn-primary {
  background: #d82800;
  color: #fff;
}

.btn-primary:hover {
  background: #ff6347;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(216, 40, 0, 0.3);
}

.btn-secondary {
  background: #fff;
  color: #1a1a2e;
  border: 2px solid #1a1a2e;
}

.btn-secondary:hover {
  background: #1a1a2e;
  color: #fff;
}

.btn-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================
   Sections
   ===================== */
.section {
  padding: 80px 20px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 15px;
}

.section-subtitle {
  font-size: 16px;
  color: #666;
}

.section-alt {
  background: #f9f9f9;
}

/* =====================
   Grid Layouts
   ===================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

/* =====================
   Feature Cards
   ===================== */
.feature-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.feature-icon {
  font-size: 60px;
  margin-bottom: 20px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

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

.feature-card:nth-child(1) .feature-icon { animation-delay: 0s; }
.feature-card:nth-child(2) .feature-icon { animation-delay: 0.2s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 0.4s; }
.feature-card:nth-child(4) .feature-icon { animation-delay: 0.6s; }
.feature-card:nth-child(5) .feature-icon { animation-delay: 0.8s; }
.feature-card:nth-child(6) .feature-icon { animation-delay: 1s; }

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #1a1a2e;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
}

/* =====================
   Plan Cards
   ===================== */
.plan-card {
  background: #fff;
  border: 3px solid #e0e0e0;
  border-radius: 15px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
}

.plan-card:hover {
  border-color: #d82800;
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(216, 40, 0, 0.15);
}

.plan-card.recommended {
  border-color: #d82800;
  background: linear-gradient(to bottom, #fff 0%, #fff5f5 100%);
}

.plan-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #d82800;
  color: #fff;
  padding: 5px 20px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.plan-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a2e;
}

.plan-price {
  font-size: 48px;
  font-weight: 700;
  color: #d82800;
  margin-bottom: 10px;
}

.plan-price span {
  font-size: 20px;
  color: #666;
}

.plan-yearly {
  font-size: 16px;
  color: #666;
  margin-top: 5px;
  margin-bottom: 10px;
}

.plan-comment {
  font-size: 13px;
  color: #d82800;
  font-weight: 500;
  margin-bottom: 20px;
  padding: 8px 12px;
  background: #fff5f5;
  border-radius: 5px;
  border-left: 3px solid #d82800;
}

.plan-features {
  list-style: none;
  margin: 30px 0;
  text-align: left;
}

.plan-features li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  position: relative;
  padding-left: 25px;
}

.plan-features li::before {
  content: '✓';
  color: #d82800;
  font-weight: 700;
  position: absolute;
  left: 0;
}

/* =====================
   Flow Steps
   ===================== */
.flow-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.flow-step {
  flex: 0 0 auto;
  width: 160px;
  text-align: center;
  position: relative;
}

.flow-step::after {
  content: '→';
  position: absolute;
  right: -30px;
  top: 40px;
  font-size: 30px;
  color: #d82800;
}

.flow-step:last-child::after {
  display: none;
}

.flow-number {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #d82800 0%, #ff6347 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  margin: 0 auto 20px;
  box-shadow: 0 5px 15px rgba(216, 40, 0, 0.3);
}

.flow-step h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #1a1a2e;
}

.flow-step p {
  color: #666;
  font-size: 14px;
}

/* =====================
   Testimonials
   ===================== */
.testimonial-card {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  border-left: 4px solid #d82800;
}

.testimonial-text {
  color: #333;
  line-height: 1.8;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.testimonial-card:nth-child(1) .author-avatar { animation-delay: 0s; }
.testimonial-card:nth-child(2) .author-avatar { animation-delay: 0.3s; }
.testimonial-card:nth-child(3) .author-avatar { animation-delay: 0.6s; }

.author-info h4 {
  font-size: 16px;
  color: #1a1a2e;
  margin-bottom: 5px;
}

.author-info p {
  font-size: 13px;
  color: #999;
}

/* =====================
   News Cards
   ===================== */
.news-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.news-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.news-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.news-card:hover .news-thumbnail img {
  transform: scale(1.05);
}

.news-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 13px;
  color: #999;
}

.news-date {
  display: inline-block;
}

.news-category {
  background: #d82800;
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
}

.news-title {
  font-size: 18px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.news-title a {
  color: #1a1a2e;
  transition: color 0.3s;
}

.news-title a:hover {
  color: #d82800;
}

.news-excerpt {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  flex: 1;
}

.news-link {
  color: #d82800;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s;
}

.news-link:hover {
  color: #ff6347;
  gap: 5px;
}

/* =====================
   CTA Section
   ===================== */
.cta-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  color: #fff;
  text-align: center;
  padding: 100px 20px;
}

.cta-section .section-title {
  color: #fff;
  font-size: 42px;
}

.cta-section .section-subtitle {
  color: #ccc;
  font-size: 18px;
  margin-bottom: 40px;
}

/* =====================
   Footer
   ===================== */
.site-footer {
  background: #000;
  color: #fff;
  padding: 60px 20px 20px;
}

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

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

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

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

.footer-section a {
  color: #ccc;
}

.footer-section a:hover {
  color: #ffd700;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* =====================
   Single Page/Post
   ===================== */
.content-area {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
}

.entry-header {
  margin-bottom: 40px;
}

.entry-title {
  font-size: 42px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
}

.entry-meta {
  color: #999;
  font-size: 14px;
}

.entry-content {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
}

.entry-content h2 {
  font-size: 32px;
  margin: 50px 0 20px;
  color: #1a1a2e;
}

.entry-content h3 {
  font-size: 24px;
  margin: 40px 0 15px;
  color: #1a1a2e;
}

.entry-content p {
  margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
  margin: 20px 0 20px 30px;
}

.entry-content li {
  margin-bottom: 10px;
}

.entry-content img {
  margin: 30px 0;
  border-radius: 8px;
}

/* =====================
   Sidebar
   ===================== */
.sidebar {
  padding: 40px;
  background: #f9f9f9;
  border-radius: 10px;
}

.widget {
  margin-bottom: 40px;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a2e;
  border-bottom: 3px solid #d82800;
  padding-bottom: 10px;
}

.widget ul {
  list-style: none;
}

.widget ul li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.widget ul li:last-child {
  border-bottom: none;
}

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

.mb-20 {
  margin-bottom: 20px;
}

.mb-40 {
  margin-bottom: 40px;
}

.mt-40 {
  margin-top: 40px;
}

/* TOPページで広告を非表示 */
.no-ads .adsbygoogle,
.no-ads ins.adsbygoogle,
.no-ads [id*="google_ads"],
.no-ads [class*="google-ad"],
.no-ads .advertisement,
.no-ads .ad-container {
  display: none !important;
}

/* =====================
   Scroll Animations
   ===================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* アニメーション遅延（順番に表示） */
.fade-in:nth-child(1) { transition-delay: 0.1s; }
.fade-in:nth-child(2) { transition-delay: 0.2s; }
.fade-in:nth-child(3) { transition-delay: 0.3s; }
.fade-in:nth-child(4) { transition-delay: 0.4s; }
.fade-in:nth-child(5) { transition-delay: 0.5s; }
.fade-in:nth-child(6) { transition-delay: 0.6s; }

/* =====================
   Hover Effects Enhancement
   ===================== */
.stat-item {
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  animation: count-up 2s ease-out;
}

@keyframes count-up {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ニュースカードのホバーエフェクト強化 */
.news-card {
  position: relative;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(216, 40, 0, 0.05) 0%, rgba(255, 215, 0, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 10px;
  z-index: 0;
  pointer-events: none;
}

.news-card:hover::before {
  opacity: 1;
}

.news-card > * {
  position: relative;
  z-index: 1;
}

/* CTAボタンのパルスアニメーション */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

/* プランカードのホバーエフェクト強化 */
.plan-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -150%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s;
  pointer-events: none;
}

.plan-card:hover::after {
  left: 100%;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 968px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 36px;
  }
  
  .hero p {
    font-size: 18px;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 30px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .flow-steps {
    flex-direction: column;
    align-items: center;
    gap: 60px;
  }
  
  .flow-step {
    width: 100%;
    max-width: 280px;
  }
  
  .flow-step::after {
    content: '↓';
    right: auto;
    top: auto;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .flow-step:last-child::after {
    display: none;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    padding: 20px;
    gap: 0;
  }
  
  .main-nav ul li {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .menu-toggle {
    display: block;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 80px 20px 60px;
  }
  
  .section {
    padding: 60px 20px;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  /* カルーセル共通スタイル */
  #features .grid-3,
  #plans .grid-3,
  #testimonials .grid-3 {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 7.5%;
  }
  
  #features .grid-3::-webkit-scrollbar,
  #plans .grid-3::-webkit-scrollbar,
  #testimonials .grid-3::-webkit-scrollbar {
    display: none;
  }
  
  /* カード幅を固定 */
  #features .feature-card,
  #plans .plan-card,
  #testimonials .testimonial-card {
    flex: 0 0 85%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  
  /* スワイプインジケーター */
  #features .section-inner::after,
  #plans .section-inner::after,
  #testimonials .section-inner::after {
    content: '← スワイプできます →';
    display: block;
    text-align: center;
    color: #999;
    font-size: 12px;
    margin-top: 20px;
    animation: fadeInOut 2s ease-in-out infinite;
  }
  
  @keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
  }
}